about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/include
diff options
context:
space:
mode:
authorXiaoming Ni <nixiaoming@huawei.com>2022-05-05 11:01:09 +0800
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2022-05-05 17:48:04 +0530
commit6a9786b8ecf84a23f9d108a46f58e9fcca70c4a9 (patch)
tree459779a5b51d8d3d651782562fccf6a0cb4c8b3c /sysdeps/unix/sysv/linux/include
parentd62a70fda8c7d772191ca8781dca46714efdd8cc (diff)
downloadglibc-6a9786b8ecf84a23f9d108a46f58e9fcca70c4a9.tar.gz
glibc-6a9786b8ecf84a23f9d108a46f58e9fcca70c4a9.tar.xz
glibc-6a9786b8ecf84a23f9d108a46f58e9fcca70c4a9.zip
ntp_xxxtimex: Use __nonnull to avoid null pointer
ntp_gettime()
ntp_gettime64()
ntp_gettimex()
ntp_gettimex64()
ntp_adjtime()
Add __nonnull((1)) 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>
Diffstat (limited to 'sysdeps/unix/sysv/linux/include')
-rw-r--r--sysdeps/unix/sysv/linux/include/sys/timex.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/include/sys/timex.h b/sysdeps/unix/sysv/linux/include/sys/timex.h
index dd599b1c32..9d0da60640 100644
--- a/sysdeps/unix/sysv/linux/include/sys/timex.h
+++ b/sysdeps/unix/sysv/linux/include/sys/timex.h
@@ -94,9 +94,9 @@ struct __ntptimeval64
   long int __glibc_reserved3;
   long int __glibc_reserved4;
 };
-extern int __ntp_gettime64 (struct __ntptimeval64 *ntv);
+extern int __ntp_gettime64 (struct __ntptimeval64 *ntv) __nonnull ((1));
 libc_hidden_proto (__ntp_gettime64)
-extern int __ntp_gettimex64 (struct __ntptimeval64 *ntv);
+extern int __ntp_gettimex64 (struct __ntptimeval64 *ntv) __nonnull ((1));
 libc_hidden_proto (__ntp_gettimex64)
 
 #  endif