Skip to content

Commit e26d5fe

Browse files
committed
add LIBC_CRASH_ON_NULLPTR for struct
1 parent 77d29e2 commit e26d5fe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libc/src/time/localtime_r.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ namespace LIBC_NAMESPACE_DECL {
1515
LLVM_LIBC_FUNCTION(struct tm *, localtime_r,
1616
(const time_t *timer, struct tm *buf)) {
1717
LIBC_CRASH_ON_NULLPTR(timer);
18+
LIBC_CRASH_ON_NULLPTR(buf);
1819

1920
return time_utils::localtime_internal(timer, buf);
2021
}

0 commit comments

Comments
 (0)