#3790: undefined behavior with <history-up>
---------------------+----------------------
Reporter: vinc17 | Owner: mutt-dev
Type: defect | Status: new
Priority: major | Milestone:
Component: mutt | Version:
Resolution: | Keywords:
---------------------+----------------------
Comment (by kevin8t8):
Just guessing after a quick glance that savelen is 0, so savebuf is NULL
in the call to memcpy.
Some quick searches show that (for C99 and C11) technically NULL is not
allowed as a parameter, even when length is 0.
Has this corner case been discussed on mutt-dev before? It's sad the spec
says so, but I guess we could create a mutt_memcpy() that explicitly
checks for len == 0 and noops.
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3790#comment:1>
Mutt <http://www.mutt.org/>
The Mutt mail user agent