diff options
author | Daniel Wagner <dwagner@suse.de> | 2021-07-08 17:18:27 +0200 |
---|---|---|
committer | John Kacur <jkacur@redhat.com> | 2021-07-09 14:02:22 -0400 |
commit | 85a60dc6be47ddb43aafe1c74a322b7629ee2187 (patch) | |
tree | c63b465bd7820279f1a4ce8ec0caacd94dbaca5b | |
parent | 8870f4fdb8e6882462ba5eb1719b0f07df4edabc (diff) | |
download | rt-tests-85a60dc6be47ddb43aafe1c74a322b7629ee2187.tar.gz |
cyclicdeadline: Fix buffer allocation
gcc complains with "‘sprintf’ output between 2 and 12 bytes" but
the buffer is only 10 bytes long. Update the buffer size to hold
the complete range of [-2147483648, 2147483646].
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r-- | src/sched_deadline/cyclicdeadline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c index ffefa9e..8447424 100644 --- a/src/sched_deadline/cyclicdeadline.c +++ b/src/sched_deadline/cyclicdeadline.c @@ -1092,7 +1092,7 @@ int main(int argc, char **argv) /* Default cpu to use is the last one */ if (!all_cpus && !setcpu) { - setcpu_buf = malloc(10); + setcpu_buf = malloc(12); if (!setcpu_buf) fatal("malloc"); sprintf(setcpu_buf, "%d", cpu_count - 1); |