More string termination bugs, this time missing terminators.
This commit is contained in:
1 parent
aa2273c7d3
commit
b9fa2e7515
1 file changed
+6
@@ -756,6 +756,9 @@ static void trans( MAC_HANDLE *handle, MAC_ENTRY *entry, long level,
|
||||
if ( v < valend ) *v++ = '(';
|
||||
cpy2val( name2, &v, valend );
|
||||
if ( v < valend ) *v++ = ')';
|
||||
|
||||
/* ensure string remains properly terminated */
|
||||
if ( v <= valend ) *v = '\0';
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -770,6 +773,9 @@ static void trans( MAC_HANDLE *handle, MAC_ENTRY *entry, long level,
|
||||
if ( v < valend ) *v++ = '(';
|
||||
cpy2val( name2, &v, valend );
|
||||
if ( v < valend ) *v++ = ')';
|
||||
|
||||
/* ensure string remains properly terminated */
|
||||
if ( v <= valend ) *v = '\0';
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user