s3-printing: fix format-truncation in print_queue_update()
authorGünther Deschner <gd@samba.org>
Tue, 8 May 2018 11:46:11 +0000 (13:46 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 20 Jun 2018 07:22:24 +0000 (09:22 +0200)
commit1b420a212e38760d801449932d1905cd74f98979
tree833a518d10245cc9f8f2ff726dd3446ffca427b0
parent35de20bd3c7f5f4e73dda5070da05b0d081c3090
s3-printing: fix format-truncation in print_queue_update()

../source3/printing/printing.c: In function ‘print_queue_update’:
../source3/printing/printing.c:1809:42: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 244 [-Werror=format-truncation=]
  snprintf(key, sizeof(key), "MSG_PENDING/%s", sharename);
                                          ^~   ~~~~~~~~~
../source3/printing/printing.c:1809:2: note: ‘snprintf’ output between 13 and 268 bytes into a destination of size 256
  snprintf(key, sizeof(key), "MSG_PENDING/%s", sharename);

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13437

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 6326b3415f3e225aafd5912d0965c80abcd7b22c)
source3/printing/printing.c