• Anton Khirnov's avatar
    lavd/jack: increase buffer size for snprintf() · 007819a5
    Anton Khirnov authored
    Maximum output size with a 32-bit int is 17 bytes, or 26 with a 64-bit
    int.
    
    Silences the following gcc 10 warning:
    src/libavdevice/jack.c: In function ‘audio_read_header’:
    src/libavdevice/jack.c:171:45: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
      171 |         snprintf(str, sizeof(str), "input_%d", i + 1);
          |                                             ^
    src/libavdevice/jack.c:171:9: note: ‘snprintf’ output between 8 and 17 bytes into a destination of size 16
      171 |         snprintf(str, sizeof(str), "input_%d", i + 1);
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    007819a5
jack.c 11.4 KB