mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
escape: fix operator precedence in overflow check
CID#1535100
Follow-up for c6342e35b0
This commit is contained in:
parent
73d8990930
commit
60cf40599a
@ -454,7 +454,7 @@ char* octescape(const char *s, size_t len) {
|
||||
if (len == SIZE_MAX)
|
||||
len = strlen(s);
|
||||
|
||||
if (len > (SIZE_MAX)-1/4)
|
||||
if (len > (SIZE_MAX - 1) / 4)
|
||||
return NULL;
|
||||
|
||||
t = buf = new(char, len * 4 + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user