Permalink
Browse files

zero the buffer for errors

  • Loading branch information...
1 parent 1907cec commit 50cf54df500c0ddd14379fa716f724d5be62d3a0 @rescrv committed Sep 10, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 e/error.h
View
1 e/error.h
@@ -71,6 +71,7 @@ inline std::string
error :: strerror(int err)
{
char buf[1024];
+ memset(buf, 0, sizeof(buf));
strerror_r(err, buf, 1024);
buf[1023] = '\0';
return std::string(buf);

0 comments on commit 50cf54d

Please sign in to comment.