Permalink
Browse files

Assumption on max signal count increased from 99 to 999.

OpenWRT has 129.
  • Loading branch information...
eugene
eugene committed Aug 27, 2018
1 parent 314d3a4 commit 869dcfa65ba1cb6c2b2b0489733338f3374b11f9
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/abstraction/os/posix/code/os_signalHandler.c
@@ -418,12 +418,12 @@ os_signalHandlerFinishExitRequest(
OS_NSIG, sig);
r = os_resultInvalid;
} else if (sigismember(&quitsMask, sig) == 0){
#if OS_NSIG >= 100
#error "Worst-case allocation assumes max. signal of 99, which apparently is not correct"
#if OS_NSIG >= 1000
#error "Worst-case allocation assumes max. signal of 999, which apparently is not correct"
#endif
/* We know which signal-number exist, all take at most 2 digits + ", ",
* so allocate worst-case 4 * quits_len */
char *expected = os_malloc(quits_len * 4 + 1);
/* We know which signal-number exist, all take at most 3 digits + ", ",
* so allocate worst-case 5 * quits_len */
char *expected = os_malloc(quits_len * 5 + 1);
if(expected){
unsigned i;
int pos;

0 comments on commit 869dcfa

Please sign in to comment.