* [PATCH] time: Fix strftime(3) API regarding nullability
@ 2023-03-12 0:08 Alejandro Colomar
2023-03-13 17:10 ` Adhemerval Zanella Netto
0 siblings, 1 reply; 5+ messages in thread
From: Alejandro Colomar @ 2023-03-12 0:08 UTC (permalink / raw)
To: libc-alpha; +Cc: Alejandro Colomar, Paul Eggert
strftime(3) doesn't accept null pointers in any of the parameters.
Cc: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
time/time.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/time/time.h b/time/time.h
index d18089116e..28fb075b19 100644
--- a/time/time.h
+++ b/time/time.h
@@ -99,7 +99,8 @@ extern time_t __REDIRECT_NTH (mktime, (struct tm *__tp), __mktime64);
of characters written, or 0 if it would exceed MAXSIZE. */
extern size_t strftime (char *__restrict __s, size_t __maxsize,
const char *__restrict __format,
- const struct tm *__restrict __tp) __THROW;
+ const struct tm *__restrict __tp)
+ __THROW __nonnull((1, 3, 4));
#ifdef __USE_XOPEN
/* Parse S according to FORMAT and store binary time information in TP.
--
2.39.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] time: Fix strftime(3) API regarding nullability
2023-03-12 0:08 [PATCH] time: Fix strftime(3) API regarding nullability Alejandro Colomar
@ 2023-03-13 17:10 ` Adhemerval Zanella Netto
2023-03-30 23:43 ` Ping: " Alejandro Colomar
0 siblings, 1 reply; 5+ messages in thread
From: Adhemerval Zanella Netto @ 2023-03-13 17:10 UTC (permalink / raw)
To: Alejandro Colomar, libc-alpha; +Cc: Alejandro Colomar, Paul Eggert
On 11/03/23 21:08, Alejandro Colomar via Libc-alpha wrote:
> strftime(3) doesn't accept null pointers in any of the parameters.
>
> Cc: Paul Eggert <eggert@cs.ucla.edu>
> Signed-off-by: Alejandro Colomar <alx@kernel.org>
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> time/time.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/time/time.h b/time/time.h
> index d18089116e..28fb075b19 100644
> --- a/time/time.h
> +++ b/time/time.h
> @@ -99,7 +99,8 @@ extern time_t __REDIRECT_NTH (mktime, (struct tm *__tp), __mktime64);
> of characters written, or 0 if it would exceed MAXSIZE. */
> extern size_t strftime (char *__restrict __s, size_t __maxsize,
> const char *__restrict __format,
> - const struct tm *__restrict __tp) __THROW;
> + const struct tm *__restrict __tp)
> + __THROW __nonnull((1, 3, 4));
>
> #ifdef __USE_XOPEN
> /* Parse S according to FORMAT and store binary time information in TP.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Ping: [PATCH] time: Fix strftime(3) API regarding nullability
2023-03-13 17:10 ` Adhemerval Zanella Netto
@ 2023-03-30 23:43 ` Alejandro Colomar
2023-03-31 13:37 ` Adhemerval Zanella Netto
2023-03-31 18:33 ` Sam James
0 siblings, 2 replies; 5+ messages in thread
From: Alejandro Colomar @ 2023-03-30 23:43 UTC (permalink / raw)
To: libc-alpha; +Cc: Alejandro Colomar, Paul Eggert, Adhemerval Zanella Netto
[-- Attachment #1.1: Type: text/plain, Size: 1229 bytes --]
Ping :)
On 3/13/23 18:10, Adhemerval Zanella Netto wrote:
>
>
> On 11/03/23 21:08, Alejandro Colomar via Libc-alpha wrote:
>> strftime(3) doesn't accept null pointers in any of the parameters.
>>
>> Cc: Paul Eggert <eggert@cs.ucla.edu>
>> Signed-off-by: Alejandro Colomar <alx@kernel.org>
>
> LGTM, thanks.
>
> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>
>> ---
>> time/time.h | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/time/time.h b/time/time.h
>> index d18089116e..28fb075b19 100644
>> --- a/time/time.h
>> +++ b/time/time.h
>> @@ -99,7 +99,8 @@ extern time_t __REDIRECT_NTH (mktime, (struct tm *__tp), __mktime64);
>> of characters written, or 0 if it would exceed MAXSIZE. */
>> extern size_t strftime (char *__restrict __s, size_t __maxsize,
>> const char *__restrict __format,
>> - const struct tm *__restrict __tp) __THROW;
>> + const struct tm *__restrict __tp)
>> + __THROW __nonnull((1, 3, 4));
>>
>> #ifdef __USE_XOPEN
>> /* Parse S according to FORMAT and store binary time information in TP.
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Ping: [PATCH] time: Fix strftime(3) API regarding nullability
2023-03-30 23:43 ` Ping: " Alejandro Colomar
@ 2023-03-31 13:37 ` Adhemerval Zanella Netto
2023-03-31 18:33 ` Sam James
1 sibling, 0 replies; 5+ messages in thread
From: Adhemerval Zanella Netto @ 2023-03-31 13:37 UTC (permalink / raw)
To: Alejandro Colomar, libc-alpha; +Cc: Alejandro Colomar, Paul Eggert
Committed, thanks.
On 30/03/23 20:43, Alejandro Colomar wrote:
> Ping :)
>
> On 3/13/23 18:10, Adhemerval Zanella Netto wrote:
>>
>>
>> On 11/03/23 21:08, Alejandro Colomar via Libc-alpha wrote:
>>> strftime(3) doesn't accept null pointers in any of the parameters.
>>>
>>> Cc: Paul Eggert <eggert@cs.ucla.edu>
>>> Signed-off-by: Alejandro Colomar <alx@kernel.org>
>>
>> LGTM, thanks.
>>
>> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>>
>>> ---
>>> time/time.h | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/time/time.h b/time/time.h
>>> index d18089116e..28fb075b19 100644
>>> --- a/time/time.h
>>> +++ b/time/time.h
>>> @@ -99,7 +99,8 @@ extern time_t __REDIRECT_NTH (mktime, (struct tm *__tp), __mktime64);
>>> of characters written, or 0 if it would exceed MAXSIZE. */
>>> extern size_t strftime (char *__restrict __s, size_t __maxsize,
>>> const char *__restrict __format,
>>> - const struct tm *__restrict __tp) __THROW;
>>> + const struct tm *__restrict __tp)
>>> + __THROW __nonnull((1, 3, 4));
>>>
>>> #ifdef __USE_XOPEN
>>> /* Parse S according to FORMAT and store binary time information in TP.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Ping: [PATCH] time: Fix strftime(3) API regarding nullability
2023-03-30 23:43 ` Ping: " Alejandro Colomar
2023-03-31 13:37 ` Adhemerval Zanella Netto
@ 2023-03-31 18:33 ` Sam James
1 sibling, 0 replies; 5+ messages in thread
From: Sam James @ 2023-03-31 18:33 UTC (permalink / raw)
To: Alejandro Colomar
Cc: Alejandro Colomar, Paul Eggert, Adhemerval Zanella Netto, libc-alpha
[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]
Alejandro Colomar via Libc-alpha <libc-alpha@sourceware.org> writes:
> [[PGP Signed Part:Undecided]]
> Ping :)
>
> On 3/13/23 18:10, Adhemerval Zanella Netto wrote:
>>
>>
>> On 11/03/23 21:08, Alejandro Colomar via Libc-alpha wrote:
>>> strftime(3) doesn't accept null pointers in any of the parameters.
>>>
>>> Cc: Paul Eggert <eggert@cs.ucla.edu>
>>> Signed-off-by: Alejandro Colomar <alx@kernel.org>
>>
>> LGTM, thanks.
>>
>> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>>
>>> ---
>>> time/time.h | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/time/time.h b/time/time.h
>>> index d18089116e..28fb075b19 100644
>>> --- a/time/time.h
>>> +++ b/time/time.h
>>> @@ -99,7 +99,8 @@ extern time_t __REDIRECT_NTH (mktime, (struct tm *__tp), __mktime64);
>>> of characters written, or 0 if it would exceed MAXSIZE. */
>>> extern size_t strftime (char *__restrict __s, size_t __maxsize,
>>> const char *__restrict __format,
>>> - const struct tm *__restrict __tp) __THROW;
>>> + const struct tm *__restrict __tp)
>>> + __THROW __nonnull((1, 3, 4));
>>>
>>> #ifdef __USE_XOPEN
>>> /* Parse S according to FORMAT and store binary time information in TP.
Nice spot. I suspect there's a few more of these we need to fix too.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-31 18:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-12 0:08 [PATCH] time: Fix strftime(3) API regarding nullability Alejandro Colomar
2023-03-13 17:10 ` Adhemerval Zanella Netto
2023-03-30 23:43 ` Ping: " Alejandro Colomar
2023-03-31 13:37 ` Adhemerval Zanella Netto
2023-03-31 18:33 ` Sam James
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).