Changed strncpy() to memcpy() in order to please static analyzers

This commit is contained in:
Thomas Schmitt 2019-08-14 16:48:23 +02:00
parent 06346c1e98
commit fe5fd8eefa
2 changed files with 6 additions and 6 deletions

View File

@ -675,22 +675,22 @@ int isoburn_invalidate_iso(struct isoburn *o, int flag)
/* /*
* replace CD001 with CDXX1 in PVM. * replace CD001 with CDXX1 in PVM.
*/ */
strncpy(head + 16 * 2048 + 1, "CDXX1", 5); memcpy(head + 16 * 2048 + 1, "CDXX1", 5);
/* Invalidate further ECMA-119 volume descriptors and possible UDF volume /* Invalidate further ECMA-119 volume descriptors and possible UDF volume
recognition sequence */ recognition sequence */
for(i= 17 * 2048; i < 32 * 2048; i+= 2048) { for(i= 17 * 2048; i < 32 * 2048; i+= 2048) {
if(end_ed_found) { if(end_ed_found) {
if(head[i] == 0 && strncmp(head + i + 1, "BEA01", 5) == 0) if(head[i] == 0 && strncmp(head + i + 1, "BEA01", 5) == 0)
strncpy(head + i + 1, "BEAX1", 5); memcpy(head + i + 1, "BEAX1", 5);
else if(head[i] == 0 && strncmp(head + i + 1, "NSR", 3) == 0) else if(head[i] == 0 && strncmp(head + i + 1, "NSR", 3) == 0)
strncpy(head + i + 1, "NSRX", 4); memcpy(head + i + 1, "NSRX", 4);
else if(head[i] == 0 && strncmp(head + i + 1, "TEA", 3) == 0) else if(head[i] == 0 && strncmp(head + i + 1, "TEA", 3) == 0)
strncpy(head + i + 1, "TEAX", 4); memcpy(head + i + 1, "TEAX", 4);
} else if(strncmp(head + i + 1, "CD001", 5) == 0) { } else if(strncmp(head + i + 1, "CD001", 5) == 0) {
if(((unsigned char *) head)[i] == 0xff) if(((unsigned char *) head)[i] == 0xff)
end_ed_found= 1; end_ed_found= 1;
strncpy(head + i + 3, "XX", 2); memcpy(head + i + 3, "XX", 2);
} }
} }

View File

@ -1 +1 @@
#define Xorriso_timestamP "2019.08.14.141748" #define Xorriso_timestamP "2019.08.14.144754"