projects
/
blktrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdaf6af
)
[PATCH] blktrace: sanity check the buf_size argument, cap at 16MiB.
author
Jens Axboe
<axboe@suse.de>
Wed, 5 Oct 2005 11:05:00 +0000
(13:05 +0200)
committer
Jens Axboe
<axboe@suse.de>
Wed, 5 Oct 2005 11:05:00 +0000
(13:05 +0200)
blktrace.c
patch
|
blob
|
blame
|
history
diff --git
a/blktrace.c
b/blktrace.c
index 8d94cbe5a1381d88b27468222510b89cee675a06..63b58ba8e0e430c23dc103cdc956462c5432746f 100644
(file)
--- a/
blktrace.c
+++ b/
blktrace.c
@@
-710,7
+710,7
@@
int main(int argc, char *argv[])
return 0;
case 'b':
buf_size = atoi(optarg);
- if (buf_size <= 0) {
+ if (buf_size <= 0
|| buf_size > 16*1024
) {
fprintf(stderr,
"Invalid buffer size (%d)\n", buf_size);
return 1;