Fix snprintf(3) format truncation bug reported by gcc 13 34/294234/1
authorŁukasz Stelmach <l.stelmach@samsung.com>
Wed, 14 Jun 2023 14:28:26 +0000 (16:28 +0200)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Wed, 14 Jun 2023 14:28:26 +0000 (16:28 +0200)
commit6ccbc245e0fbca9cddf0da5d33acd73a3a7e7c40
tree32c169913d34b6e8dfc333987c0d03813743eccc
parent3156549d6ad3052da5888db2a7848c0a7566d492
Fix snprintf(3) format truncation bug reported by gcc 13

src/tests/deduplicate_test.c: In function 'test_advanced_many_millisec':
src/tests/deduplicate_test.c:331:54: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
  331 |                         snprintf(msg, sizeof msg, "%d", index);
      |                                                      ^
src/tests/deduplicate_test.c:331:25: note: 'snprintf' output between 2 and 5 bytes into a destination of size 4
  331 |                         snprintf(msg, sizeof msg, "%d", index);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I9b26e20b3d81595dcbf09dd0584c23a37ff68599
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
src/tests/deduplicate_test.c