Fix lurking bug exposed by r18687

svn path=/trunk/; revision=18781
This commit is contained in:
Gé van Geldorp 2005-10-26 23:19:37 +00:00
parent ae16fd8e66
commit c40ca03e31

View file

@ -595,6 +595,7 @@ pretty_print_option(unsigned int code, unsigned char *data, int len,
foo.s_addr = htonl(getULong(dp));
strncpy(op, inet_ntoa(foo), opleft - 1);
op[opleft - 1] = ANSI_NULL;
opcount = strlen(op);
if (opcount >= opleft)
goto toobig;
opleft -= opcount;