1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

adjtimex/adjtimex64: Use __nonnull to avoid null pointer

Add __nonnull((1)) to the adjtimex()/adjtimex64() function declaration
    to avoid null pointer access.

Link: https://sourceware.org/bugzilla/show_bug.cgi?id=27662
Link: https://sourceware.org/bugzilla/show_bug.cgi?id=29084
Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
Xiaoming Ni
2022-05-05 11:01:08 +08:00
committed by Siddhesh Poyarekar
parent eff158b75d
commit d62a70fda8
2 changed files with 4 additions and 4 deletions

View File

@@ -55,7 +55,7 @@ struct ntptimeval
__BEGIN_DECLS
#ifndef __USE_TIME_BITS64
extern int adjtimex (struct timex *__ntx) __THROW;
extern int adjtimex (struct timex *__ntx) __THROW __nonnull ((1));
extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
# ifdef __REDIRECT_NTH
@@ -68,7 +68,7 @@ extern int ntp_adjtime (struct timex *__tntx) __THROW;
#else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (adjtimex, (struct timex *__ntx),
___adjtimex64);
___adjtimex64) __nonnull ((1));
extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
__ntp_gettime64);
extern int __REDIRECT_NTH (ntp_gettimex, (struct ntptimeval *__ntv),