README.md
Rendering markdown...
diff --git a/nanohttp.c b/nanohttp.c
index 9519179..7c67bd3 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -1461,6 +1461,10 @@ retry:
if (headers != NULL)
p += snprintf( p, blen - (p - bp), "%s", headers );
+ if (blen < (p - bp)) {
+ printf("Buffer overflow is detected \r\n");
+ }
+
if (input != NULL)
snprintf(p, blen - (p - bp), "Content-Length: %d\r\n\r\n", ilen );
else