Skip to content

Commit 2fefbab

Browse files
add nul terminator to msg string in LG_ERROR_MSG macro
1 parent e70687b commit 2fefbab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utility/LG_internal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ typedef unsigned char LG_void ;
8989
if (msg != NULL && msg [0] == '\0') \
9090
{ \
9191
snprintf (msg, LAGRAPH_MSG_LEN, __VA_ARGS__) ; \
92+
msg [LAGRAPH_MSG_LEN-1] = '\0' ; \
9293
} \
9394
}
9495

0 commit comments

Comments
 (0)