ensure string termination when using strncpy

CID 1352823
This commit is contained in:
Mike Blumenkrantz 2016-03-10 11:10:21 -05:00
parent c95f3347ae
commit 77602a5853
1 changed files with 1 additions and 1 deletions

View File

@ -1370,7 +1370,7 @@ e_gadget_type_del(const char *type)
E_Gadget_Config *zgc;
char buf[1024];
strncpy(buf, type, sizeof(buf));
strncpy(buf, type, sizeof(buf) - 1);
if (!gadget_types) return;