laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/39442?usp=email )

 (

4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: fix up usb version string, not 0 terminated
......................................................................

fix up usb version string, not 0 terminated

Change-Id: I198f0a55c5c5853ea58f20ad4124a909952a3074
---
M sysmoOCTSIM/main.c
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved




diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c
index bf145cd..2346cfe 100644
--- a/sysmoOCTSIM/main.c
+++ b/sysmoOCTSIM/main.c
@@ -462,8 +462,8 @@
 char sernr_buf[16*2+1];
 char product_buf[] = "sysmoOCTSIM "GIT_VERSION;
 //len, type, 2 byte per hex char * 2 for unicode
-uint8_t sernr_buf_descr[1+1+16*2*2];
-uint8_t product_buf_descr[1+1+sizeof(product_buf)*2];
+uint8_t sernr_buf_descr[1 + 1 + 16 * 2 * 2];
+uint8_t product_buf_descr[1 + 1 + (sizeof(product_buf) - 1) * 2];

 char rstcause_buf[RSTCAUSE_STR_SIZE];

@@ -498,7 +498,7 @@
        get_chip_unique_serial_str(sernr_buf, sizeof(sernr_buf));
        str_to_usb_desc(sernr_buf, sizeof(sernr_buf), sernr_buf_descr, 
sizeof(sernr_buf_descr));

-       str_to_usb_desc(product_buf, sizeof(product_buf), product_buf_descr, 
sizeof(product_buf_descr));
+       str_to_usb_desc(product_buf, sizeof(product_buf) - 1, 
product_buf_descr, sizeof(product_buf_descr));
        get_rstcause_str(rstcause_buf);

 

--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/39442?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I198f0a55c5c5853ea58f20ad4124a909952a3074
Gerrit-Change-Number: 39442
Gerrit-PatchSet: 6
Gerrit-Owner: Hoernchen <ew...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>

Reply via email to