pixmap: omitting curly braces considered harmful

The break being outside of the else block effectively made an if clause
out of the while loop. This caused long hostnames to not be shortened
sufficiently which subsequentely made strcpy() write beyond buffer
boundaries.
merge-requests/1/head
Nils Philippsen 2013-10-29 14:14:18 +01:00
rodzic 3b96baef65
commit d35d6326cb
1 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -367,9 +367,11 @@ determine_scanner_serial (const char *hostname, const char * mac_address, char *
*dot = '\0';
}
else
{
strcpy(copy, mac_address);
break;
}
}
strcpy( serial, copy );
return serial;
}