I'm only seeing an error in 14+, so I assume it is due to different
compiler options:
app_queue.c: In function ‘handle_queue_add_member’:
app_queue.c:10234:19: error: ‘%d’ directive writing between 1 and 11
bytes into a region of size 3 [-Werror=format-overflow=]
sprintf(num, "%d", state);
^~
app_queue.c:10234:18: note: directive argument in the range
[-
2147483648, 99]
sprintf(num, "%d", state);
^~~~
Compiler: gcc version 8.0.1
20180414 (experimental)
[trunk revision 259383] (Ubuntu 8-
20180414-1ubuntu2)
Change-Id: I18577590da46829c1ea7d8b82e41d69f105baa10
case 6: /* only one possible match, "penalty" */
return state == 0 ? ast_strdup("penalty") : NULL;
case 7:
- if (state < 100) { /* 0-99 */
+ if (0 <= state && state < 100) { /* 0-99 */
char *num;
if ((num = ast_malloc(3))) {
sprintf(num, "%d", state);