More string termination bugs, this time missing terminators.

This commit is contained in:
Andrew Johnson
2004-06-16 19:10:11 +00:00
parent aa2273c7d3
commit b9fa2e7515

View File

@@ -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;
}