projects
/
platform
/
upstream
/
nsjail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ed9081
)
cmdline: check val value before conversion
author
Robert Swiecki
<robert@swiecki.net>
Fri, 25 May 2018 22:40:28 +0000
(
00:40
+0200)
committer
Robert Swiecki
<robert@swiecki.net>
Fri, 25 May 2018 22:40:28 +0000
(
00:40
+0200)
cmdline.cc
patch
|
blob
|
history
diff --git
a/cmdline.cc
b/cmdline.cc
index
0872606
..
83407f6
100644
(file)
--- a/
cmdline.cc
+++ b/
cmdline.cc
@@
-289,11
+289,11
@@
uint64_t parseRLimit(int res, const char* optarg, unsigned long mul) {
res, optarg);
}
errno = 0;
- uint64_t val = strtoull(optarg, NULL, 0)
* mul
;
+ uint64_t val = strtoull(optarg, NULL, 0);
if (val == ULLONG_MAX && errno != 0) {
PLOG_F("strtoul('%s', 0)", optarg);
}
- return val;
+ return val
* mul
;
}
static std::string argFromVec(const std::vector<std::string>& vec, size_t pos) {