]> source.dussan.org Git - tigervnc.git/commitdiff
Increase version string buffer size for gcc
authorPierre Ossman <ossman@cendio.se>
Mon, 1 Apr 2019 12:55:40 +0000 (14:55 +0200)
committerPierre Ossman <ossman@cendio.se>
Mon, 1 Apr 2019 12:55:40 +0000 (14:55 +0200)
There is some bug in gcc's new -Werror=format-overflow that makes it
think majorVersion could end up being very large. Increase the target
buffer for now to keep gcc happy.

common/rfb/CConnection.cxx

index af84226b72b4d1ff880d55990f024ffe609df069..d6960dd291d29dea84bdb1e761b75b205f94f200 100644 (file)
@@ -143,7 +143,7 @@ void CConnection::processMsg()
 
 void CConnection::processVersionMsg()
 {
-  char verStr[13];
+  char verStr[27]; // FIXME: gcc has some bug in format-overflow
   int majorVersion;
   int minorVersion;