(/home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/mpeg.c) |
| |
| 52 | | | mpeg_resync(wtap *wth, int *err, gchar **err_info _U_) |
| 53 | | | { |
| 54 | | | gint64 offset = file_tell(wth->fh); |
| 55 | | | int count = 0; |
| 56 | | | int byte = file_getc(wth->fh); |
| 57 | | | |
| 58 | | | while (byte != EOF) { |
| 59 | | | if (byte == 0xff && count > 0) { |
| 60 | | | byte = file_getc(wth->fh); |
| 61 | | | if (byte != EOF && (byte & 0xe0) == 0xe0) |
| 62 | | | break; |
| 63 | | | } else |
| 64 | | | byte = file_getc(wth->fh); |
| 65 | | | count++; |
| 66 | | | } |
| 67 | | | file_seek(wth->fh, offset, SEEK_SET, err);
x /usr/include/stdio.h |
| |
141 | #define SEEK_SET 0 /* Seek from beginning of file. */ |
| |
|
Ignored Return Value
The return value of file_seek() is never checked in the highlighted execution scenario. - If the return value can indicate an error, the error will be ignored if the highlighted code executes.
- The return value of file_seek() is checked 99% of the time in this project. CodeSonar is configured to enforce Ignored Return Value checks for any function whose return value is checked at least 96% of the time, unless the function is used fewer than 20 times. (To modify these thresholds, use configuration file parameters RETURN_CHECKER_SAMPLE_SIZE and RETURN_CHECKER_RATIO. To exempt file_seek() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 68 | | | return count; |
| 69 | | | } |
| |