OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5e0046
)
trasher: check seek return value.
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 13 Oct 2012 17:46:53 +0000
(19:46 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 13 Oct 2012 18:35:56 +0000
(20:35 +0200)
Fixes CID733726
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tools/trasher.c
patch
|
blob
|
history
diff --git
a/tools/trasher.c
b/tools/trasher.c
index
93bfc0c
..
aaa09f4
100644
(file)
--- a/
tools/trasher.c
+++ b/
tools/trasher.c
@@
-56,7
+56,10
@@
int main(int argc, char **argv)
while (count--) {
int burst = 1 + ran() * (uint64_t) (abs(maxburst) - 1) / UINT32_MAX;
int pos = ran() * (uint64_t) length / UINT32_MAX;
- fseek(f, pos, SEEK_SET);
+ if (fseek(f, pos, SEEK_SET) < 0) {
+ fprintf(stderr, "seek failed\n");
+ return 1;
+ }
if (maxburst < 0)
burst = -maxburst;