public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/4] time: Use __nonnull to avoid null pointer
@ 2022-04-28 12:25 Xiaoming Ni
  2022-04-28 12:25 ` [PATCH 1/4] adjtimex/adjtimex64: " Xiaoming Ni
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Xiaoming Ni @ 2022-04-28 12:25 UTC (permalink / raw)
  To: drepper, lukma, adrian.ratiu, schwab, fweimer, adhemerval.zanella
  Cc: nixiaoming, wangle6, libc-alpha

Some external interface codes do not check whether the pointer parameter
 is null. If the parameter is null, the program crashes (BZ#27662).
Therefore, add a __nonull statement to the function declaration to avoid
 null pointers.

Link: https://sourceware.org/bugzilla/show_bug.cgi?id=27662
Link: https://sourceware.org/bugzilla/show_bug.cgi?id=29084

The __nonull declaration is added for the following interfaces:
	adjtimex()
	adjtimex64()
	ntp_gettime()
	ntp_gettime64()
	ntp_gettimex()
	ntp_gettimex64()
	ntp_adjtime()
	clock_settime()
	clock_settime64()
	clock_gettime()
	clock_gettime64()
	clock_adjtime()
	clock_adjtime64()

--
Xiaoming Ni (4):
  adjtimex/adjtimex64: Use __nonnull to avoid null pointer
  ntp_xxxtimex: Use __nonnull to avoid null pointer
  clock_adjtime: Use __nonnull to avoid null pointer
  clock_settime/clock_gettime: Use __nonnull to avoid null pointer

 include/time.h                              |  4 ++--
 sysdeps/unix/sysv/linux/bits/time.h         |  4 ++--
 sysdeps/unix/sysv/linux/include/sys/timex.h | 10 +++++-----
 sysdeps/unix/sysv/linux/sys/timex.h         | 16 ++++++++--------
 time/time.h                                 |  9 ++++++---
 5 files changed, 23 insertions(+), 20 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-05-05 12:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 12:25 [PATCH 0/4] time: Use __nonnull to avoid null pointer Xiaoming Ni
2022-04-28 12:25 ` [PATCH 1/4] adjtimex/adjtimex64: " Xiaoming Ni
2022-05-04 10:56   ` Siddhesh Poyarekar
2022-04-28 12:25 ` [PATCH 2/4] ntp_xxxtimex: " Xiaoming Ni
2022-05-04 10:59   ` Siddhesh Poyarekar
2022-04-28 12:25 ` [PATCH 3/4] clock_adjtime: " Xiaoming Ni
2022-05-04 11:00   ` Siddhesh Poyarekar
2022-04-28 12:25 ` [PATCH 4/4] clock_settime/clock_gettime: " Xiaoming Ni
2022-05-04 11:02   ` Siddhesh Poyarekar
2022-05-05  1:39     ` Xiaoming Ni
2022-05-05  3:01 ` [PATCH v2 0/4] time: " Xiaoming Ni
2022-05-05  3:01   ` [PATCH v2 1/4] adjtimex/adjtimex64: " Xiaoming Ni
2022-05-05  3:01   ` [PATCH v2 2/4] ntp_xxxtimex: " Xiaoming Ni
2022-05-05  3:01   ` [PATCH v2 3/4] clock_adjtime: " Xiaoming Ni
2022-05-05  3:01   ` [PATCH v2 4/4] clock_settime/clock_gettime: " Xiaoming Ni
2022-05-05  4:26     ` Siddhesh Poyarekar
2022-05-05  8:23       ` Xiaoming Ni
2022-05-05 12:26         ` Siddhesh Poyarekar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).