forked from len0rd/rockbox
no strcpy for codecs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6061 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
089c5f7957
commit
8cb37d3a54
2 changed files with 6 additions and 6 deletions
|
@ -62,7 +62,7 @@ int unpack_init (WavpackContext *wpc)
|
||||||
|
|
||||||
while (read_metadata_buff (wpc, &wpmd)) {
|
while (read_metadata_buff (wpc, &wpmd)) {
|
||||||
if (!process_metadata (wpc, &wpmd)) {
|
if (!process_metadata (wpc, &wpmd)) {
|
||||||
strcpy (wpc->error_message, "invalid metadata!");
|
/*strcpy (wpc->error_message, "invalid metadata!");*/
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ int unpack_init (WavpackContext *wpc)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wps->wphdr.block_samples && !bs_is_open (&wps->wvbits)) {
|
if (wps->wphdr.block_samples && !bs_is_open (&wps->wvbits)) {
|
||||||
strcpy (wpc->error_message, "invalid WavPack file!");
|
/*strcpy (wpc->error_message, "invalid WavPack file!");*/
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,12 +63,12 @@ WavpackContext *WavpackOpenFileInput (read_stream infile, char *error)
|
||||||
bcount = read_next_header (wpc.infile, &wps->wphdr);
|
bcount = read_next_header (wpc.infile, &wps->wphdr);
|
||||||
|
|
||||||
if (bcount == (ulong) -1) {
|
if (bcount == (ulong) -1) {
|
||||||
strcpy (error, "not compatible with this version of WavPack file!");
|
/*strcpy (error, "not compatible with this version of WavPack file!");*/
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((wps->wphdr.flags & UNKNOWN_FLAGS) || wps->wphdr.version < 0x402 || wps->wphdr.version > 0x40f) {
|
if ((wps->wphdr.flags & UNKNOWN_FLAGS) || wps->wphdr.version < 0x402 || wps->wphdr.version > 0x40f) {
|
||||||
strcpy (error, "not compatible with this version of WavPack file!");
|
/*strcpy (error, "not compatible with this version of WavPack file!");*/
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,8 +76,8 @@ WavpackContext *WavpackOpenFileInput (read_stream infile, char *error)
|
||||||
wpc.total_samples = wps->wphdr.total_samples;
|
wpc.total_samples = wps->wphdr.total_samples;
|
||||||
|
|
||||||
if (!unpack_init (&wpc)) {
|
if (!unpack_init (&wpc)) {
|
||||||
strcpy (error, wpc.error_message [0] ? wpc.error_message :
|
/*strcpy (error, wpc.error_message [0] ? wpc.error_message :
|
||||||
"not compatible with this version of WavPack file!");
|
"not compatible with this version of WavPack file!");*/
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue