Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stefan Strogin
flac
Commits
25d38737
Commit
25d38737
authored
Aug 27, 2015
by
Erik de Castro Lopo
Browse files
tests: Fix undefined behaviour
Undefined behaviour in the test support code.
parent
a1458164
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/test_libFLAC/md5.c
View file @
25d38737
...
...
@@ -167,8 +167,7 @@ static FLAC__byte target_digests [8][4][16] =
static
FLAC__bool
test_md5_codec
(
void
)
{
FLAC__int32
arrays
[
MAX_CHANNEL_COUNT
][
MD5_SAMPLE_COUNT
],
*
pointer
[
MAX_CHANNEL_COUNT
],
**
signal
;
FLAC__int32
seed
=
0x12345679
;
unsigned
chan
,
byte_size
;
unsigned
chan
,
byte_size
,
seed
=
0x12345679
;
/* Set up signal data using a trival Linear Congruent PRNG. */
signal
=
&
pointer
[
0
];
...
...
src/test_libs_common/metadata_utils.c
View file @
25d38737
...
...
@@ -338,7 +338,7 @@ FLAC__bool mutils__compare_block_data_picture(const FLAC__StreamMetadata_Picture
printf
(
"FAILED, data_length mismatch, expected %u, got %u
\n
"
,
block
->
data_length
,
blockcopy
->
data_length
);
return
false
;
}
if
(
memcmp
(
blockcopy
->
data
,
block
->
data
,
block
->
data_length
))
{
if
(
block
->
data_length
>
0
&&
memcmp
(
blockcopy
->
data
,
block
->
data
,
block
->
data_length
))
{
printf
(
"FAILED, data mismatch
\n
"
);
return
false
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment