return on error to prevent crash
This commit is contained in:
@@ -609,6 +609,7 @@ static void encodeTerminator(char *result, char *terminator)
|
|||||||
|
|
||||||
if (terminator == NULL) {
|
if (terminator == NULL) {
|
||||||
result[0] = '\0';
|
result[0] = '\0';
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
len = strlen(terminator);
|
len = strlen(terminator);
|
||||||
snprintf(pBuffer,sizeof(pBuffer)-1, "0x%x", (int) terminator[0]);
|
snprintf(pBuffer,sizeof(pBuffer)-1, "0x%x", (int) terminator[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user