Menu

#10 array subscript out of range + local variable used before se

open
nobody
None
5
2009-10-23
2009-10-23
No

We've received the following report from a reporter:
----
1.

mpegtools/remux.c(468): warning #175: subscript out of range

The source code is

uint8_t b[3];

vring_peek( rem, b, 4, 0);
if ( b[0] == 0x00 && b[1] == 0x00 && b[2] == 0x01
&& b[3] == 0xb3) found = 4;

Clearly broken code. b[ 3] doesn't exist. Suggest code rework, but I don't have
a suggested fix for this.

2.

tune.c(202): warning #592: variable "fe_info" is used before its value is set

The source code is

switch(fe_info.type) {

Suggest initialise local variable "fe_info" before first use.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB