Explorar o código

increase ota message buffer size by a byte - release

Sebastien %!s(int64=5) %!d(string=hai) anos
pai
achega
34459f54ef
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      components/squeezelite-ota/squeezelite-ota.c

+ 1 - 1
components/squeezelite-ota/squeezelite-ota.c

@@ -95,7 +95,7 @@ void sendMessaging(messaging_types type,const char * fmt, ...){
     char * msg_str=NULL;
 
     va_start(args, fmt);
-    str_len = vsnprintf(NULL,0,fmt,args);
+    str_len = vsnprintf(NULL,0,fmt,args)+1;
     if(str_len>0){
     	msg_str = malloc(str_len);
     	vsnprintf(msg_str,str_len,fmt,args);