Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-13 21:46:53 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-10-13 22:35:56 +0400
commit8ab0b9cabacad57cad7c26144baa544fab9c2ba7 (patch)
tree3fbe0565b8e49d4570aec529882859d7d238c9b8 /tools
parenta5e0046a730b2eb44d7824d9519a0f2119aa7690 (diff)
trasher: check seek return value.
Fixes CID733726 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools')
-rw-r--r--tools/trasher.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/trasher.c b/tools/trasher.c
index 93bfc0c3e4..aaa09f4ca8 100644
--- 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;