[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] dynamic-complete-history: avoid null ptr qsort UB
From: |
Chet Ramey |
Subject: |
Re: [PATCH] dynamic-complete-history: avoid null ptr qsort UB |
Date: |
Wed, 22 May 2024 15:13:27 -0400 |
User-agent: |
Mozilla Thunderbird |
On 5/21/24 11:58 PM, Grisha Levit wrote:
$ HISTFILE= bash --norc -in <<< $'#\n#\e\t'
bashline.c:3720:16: runtime error: null pointer passed as argument 1, which is
declared to never be null
/usr/include/stdlib.h:971:30: note: nonnull attribute specified here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior bashline.c:3720:16
Interesting that this has never actually hit since 1991 when dynamic
history completion was implemented.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/