]> git.tuebingen.mpg.de Git - paraslash.git/commit
play: Handle empty arguments to --key-map gracefully.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 3 Oct 2015 22:48:38 +0000 (22:48 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 25 Oct 2015 19:12:44 +0000 (20:12 +0100)
commit64cc9685a1bfa789dbcc447d68493691727e11ba
tree199511b6fbde52930efa762b07ae3c39e640a16f
parent0f4910b50116416fefb09ca67a615679067ef359
play: Handle empty arguments to --key-map gracefully.

Executing para_play with an empty argument to --key-map results in
a read which starts one byte past the allocated buffer:

==24163== Invalid read of size 1
==24163==    at 0x402A1DA: index (mc_replace_strmem.c:223)
==24163==    by 0x804DA22: main (play.c:187)
==24163==  Address 0x498e331 is 0 bytes after a block of size 1 alloc'd

This patch fixes the issue by rejecting empty arguments as invalid.
play.c