Browse Source

Fix possibly uninitialized variable 'truncated' reported by Coverity.

Kimmo Mustonen 8 years ago
parent
commit
b484f5ca9a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/civetweb.c

+ 3 - 0
src/civetweb.c

@@ -2684,6 +2684,9 @@ mg_vsnprintf(const struct mg_connection *conn,
 	int n, ok;
 
 	if (buflen == 0) {
+		if (truncated) {
+			*truncated = 1;
+		}
 		return;
 	}