Blob Blame History Raw
diff --git a/src/st-util/gdb-server.c b/src/st-util/gdb-server.c
index c47a3a9f..4177cef1 100644
--- a/src/st-util/gdb-server.c
+++ b/src/st-util/gdb-server.c
@@ -43,7 +43,7 @@
 static stlink_t *connected_stlink = NULL;
 static bool semihosting = false;
 static bool serial_specified = false;
-static char serialnumber[28] = {0};
+static char serialnumber[STLINK_SERIAL_MAX_SIZE] = {0};
 
 #if defined(_WIN32)
 #define close_socket win32_close_socket