Fixed off by 1 error in section code (did not return len-2 on buffer overflow in some cases, but len-1).
diff --git a/files/profile.c b/files/profile.c index 9c22e3a..1fc08dc 100644 --- a/files/profile.c +++ b/files/profile.c
@@ -579,7 +579,7 @@ } } *buffer = '\0'; - if (len < 1) + if (len <= 1) /*If either lpszSection or lpszKey is NULL and the supplied destination buffer is too small to hold all the strings, the last string is truncated and followed by two null characters.