Fix cppcheck warning "buffer may not be null-terminated after call to strncpy()"
This commit is contained in:
parent
3e773ab494
commit
1d5f9956fb
5 changed files with 5 additions and 0 deletions
|
|
@ -130,6 +130,7 @@ static int scan_hex_fd3(uint8_t *pbtData, size_t *pszBytes, const char *pchPrefi
|
|||
}
|
||||
}
|
||||
strncpy(pchScan, pchPrefix, 250);
|
||||
pchScan[sizeof(pchScan) - 1] = '\0';
|
||||
strcat(pchScan, " %04x:");
|
||||
if (fscanf(fd3, pchScan, &uiBytes) < 1) {
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue