Fix bug #3188385: ensure that options_snoptionf terminates its output

svn path=/trunk/netsurf/; revision=11749
This commit is contained in:
John Mark Bell 2011-02-21 21:25:47 +00:00
parent 66247f5b37
commit 63f902e995

View File

@ -633,6 +633,10 @@ int options_snoptionf(char *string, size_t size, unsigned int option,
fmtc++;
}
}
/* Ensure that we NUL-terminate the output */
string[min(slen, size - 1)] = '\0';
return slen;
}