---
+* CID 1296235: Fix refclock_jjy.c and correcting type of the driver40-ja.html
* CID 1269537: Clean up a line of dead code in getShmTime().
* CID 1295478: Quiet a pedantic potential error from the fix for Bug 2776.
* [Bug 2590] autogen-5.18.5.
<body>
<h3>JJY Receivers</h3>
<p>Last update:
- <!-- #BeginDate format:En2m -->30-Apr-2015 05:53<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->11-Apr-2015 00:00<!-- #EndDate -->
UTC <a href="driver40.html">ENGLISH(英語)</a> <a href="driver40-ja.html">JAPANESE(日本語)</a></p>
<hr>
<h4>Synopsis</h4>
<dd>
<p>Time1 は、受信機からの時刻に加算する調整時間を、固定小数点形式の秒で設定します。<br>
mode 100 の場合は、time1 で調整する時間を設定したほうが良いでしょう。<br>
- mode 101 から 108 の場合は、このドライバーが計測したループバックの遅延時間の一定の割合を同期時刻に加算しますので、time1 は設定しないほうが良いでしょう。</p>
+ mode 101 から 180 の場合は、このドライバーが計測したループバックの遅延時間の一定の割合を同期時刻に加算しますので、time1 は設定しないほうが良いでしょう。</p>
<div style="text-align:left;">Flag1 は、タッチ・トーンかダイヤル・パルスかを指定します。</div>
<table border="1" summary="fudge flag1">
<tr><td>0 (Default)</td><td>タッチ・トーン</td><td>ATDWTnn...nn</td></tr>
*/
if ( up->linediscipline == LDISC_RAW ) {
- pp->lencode = refclock_gtraw ( rbufp, pp->a_lastcode, BMAX, &tRecvTimestamp ) ;
+ pp->lencode = refclock_gtraw ( rbufp, pp->a_lastcode, BMAX-1, &tRecvTimestamp ) ;
+ /* 3rd argument can be BMAX, but the coverity scan tool claim "Memory - corruptions (OVERRUN)" */
+ /* "a_lastcode" is defined as "char a_lastcode[BMAX]" in the ntp_refclock.h */
+ /* To avoid its claim, pass the value BMAX-1. */
/*
* Append received charaters to temporary buffer
iNumberOfDigitsOfPhoneNumber = iCommaCount = iCommaPosition = iFirstThreeDigitsCount = 0 ;
for ( i = 0 ; i < strlen( sys_phone[0] ) ; i ++ ) {
if ( isdigit( *(sys_phone[0]+i) ) ) {
- if ( iFirstThreeDigitsCount < MAX_LOOPBACK ) {
+ if ( iFirstThreeDigitsCount < sizeof(sFirstThreeDigits)-1 ) {
sFirstThreeDigits[iFirstThreeDigitsCount++] = *(sys_phone[0]+i) ;
}
iNumberOfDigitsOfPhoneNumber ++ ;
iAverCount ++ ;
}
+ if ( iAverCount == 0 ) {
+ /* This is never happened. */
+ /* Previous for-if-for blocks assure iAverCount > 0. */
+ /* This code avoids a claim by the coverity scan tool. */
+ return -1 ;
+ }
+
/* mode 101 = 1%, mode 150 = 50%, mode 180 = 80% */
iPercent = ( peer->ttl - 100 ) ;