fix SetCipherList() possible 1 byte overrun

This commit is contained in:
toddouska 2014-12-01 14:34:48 -08:00
parent 295e65ca02
commit 09aeda2162

View File

@ -9019,7 +9019,7 @@ int SetCipherList(Suites* suites, const char* list)
: (word32)(next - current));
XSTRNCPY(name, current, length);
name[length] = 0;
name[(length == sizeof(name)) ? length - 1 : length] = 0;
for (i = 0; i < suiteSz; i++) {
if (XSTRNCMP(name, cipher_names[i], sizeof(name)) == 0) {