diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-09-20 17:53:03 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-20 17:53:03 +0200 |
commit | aa408e7799cf01f048efedf434916544b4badc77 (patch) | |
tree | c0aa91be952b32c6e05006fe825b180a8c85e503 /src/shared/util.c | |
parent | 3f8cc098d218525710e5cbad9adf37001d3b6060 (diff) |
util: fix overflow checks
Diffstat (limited to 'src/shared/util.c')
-rw-r--r-- | src/shared/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 02ee6374c3..be94515d9d 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -1184,7 +1184,7 @@ char *strnappend(const char *s, const char *suffix, size_t b) { assert(suffix); a = strlen(s); - if ((size_t) -1 - a > b) + if (b > ((size_t) -1) - a) return NULL; r = new(char, a+b+1); |