diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-01-13 23:59:21 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-01-14 00:03:38 +0100 |
commit | 20686256dbc94fd693607abd5165ecc9901dd1e3 (patch) | |
tree | 31de065ef623dca1af4545f6e6298acab866a49f /sfeed_gph.1 | |
parent | 790a941eb0c78867f744d0551ac20b421b6c75e2 (diff) |
sfeed_curses: pedantic fix for UB with an empty URL file
When a new URL file is used with no URL entries then NULL is passed to qsort()
and bsearch(). This is reported by clang UBsan as undefined behaviour
(debatable), but no issue in practise with many implementations. Fix it anyway.
To reproduce with clang UBsan:
Compile with clang or gcc with CFLAGS and LDFLAGS -fsanitize=undefined
touch /tmp/urls # new file which should be empty.
SFEED_URL_FILE=/tmp/urls sfeed_curses 2>/tmp/log
^D
q
cat /tmp/log
Diffstat (limited to 'sfeed_gph.1')
0 files changed, 0 insertions, 0 deletions