Merge pull request #7150 from jamessan/cid-166184

coverity/166184: Check length of str, not term
This commit is contained in:
James McCoy 2017-08-11 12:24:45 -04:00 committed by GitHub
commit f2fd5afb48

View File

@ -45,7 +45,7 @@
#define OUTBUF_SIZE 0xffff
#define TOO_MANY_EVENTS 1000000
#define STARTS_WITH(str, prefix) (strlen(term) >= (sizeof(prefix) - 1) \
#define STARTS_WITH(str, prefix) (strlen(str) >= (sizeof(prefix) - 1) \
&& 0 == memcmp((str), (prefix), sizeof(prefix) - 1))
#define TMUX_WRAP(is_tmux, seq) ((is_tmux) \
? "\x1bPtmux;\x1b" seq "\x1b\\" : seq)