diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2025-06-09 14:27:29 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2025-06-09 14:27:29 +0200 |
commit | 652efae78c00b812033ea162d76cd13bd40dcab6 (patch) | |
tree | 7c139f4d2a28061607cd7e2269693df993e5d60a /backend/pixma/pixma_io_sanei.c | |
parent | bfa2ae8e43fcbab696f272fffd164d0637e965c5 (diff) |
New upstream version 1.4.0upstream/1.4.0upstream
Diffstat (limited to 'backend/pixma/pixma_io_sanei.c')
-rw-r--r-- | backend/pixma/pixma_io_sanei.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/pixma/pixma_io_sanei.c b/backend/pixma/pixma_io_sanei.c index 394523e..756e0de 100644 --- a/backend/pixma/pixma_io_sanei.c +++ b/backend/pixma/pixma_io_sanei.c @@ -132,7 +132,7 @@ attach_bjnp (SANE_String_Const devname, return SANE_STATUS_NO_MEM; si->cfg = cfg; - sprintf(si->serial, "%s_%s", cfg->model, serial); + snprintf(si->serial, sizeof(si->serial), "%s_%s", cfg->model, serial); si -> interface = INT_BJNP; si->next = first_scanner; first_scanner = si; @@ -188,7 +188,7 @@ u16tohex (uint16_t x, char *str) static void read_serial_number (scanner_info_t * si) { - uint8_t unicode[2 * (PIXMA_MAX_ID_LEN - 9) + 2]; + uint8_t unicode[2 * (PIXMA_MAX_ID_LEN - 9) + 2]; // 9 = size of VID + PID + "_" uint8_t ddesc[18]; int iSerialNumber; SANE_Int usb; |