Skip to content

Commit

Permalink
Check something has initialised the log buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Aug 1, 2013
1 parent 6792d2d commit 358afb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/log.c
Expand Up @@ -94,7 +94,7 @@ char const *fr_strerror(void)
char *buffer;

buffer = fr_thread_local_get(fr_strerror_buffer);
if (buffer[FR_STRERROR_BUFSIZE]) {
if (buffer && buffer[FR_STRERROR_BUFSIZE]) {
buffer[FR_STRERROR_BUFSIZE] = '\0'; /* Flip the 'new' byte to false */
return buffer;
}
Expand Down

0 comments on commit 358afb7

Please sign in to comment.