util: add check for size validity (Coverity #50224)
commitd90c8d5370fc658b962671c534929972c832a61f
authorChristophe CURIS <christophe.curis@free.fr>
Mon, 16 Jun 2014 18:15:28 +0000 (16 20:15 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Mon, 16 Jun 2014 19:00:09 +0000 (16 20:00 +0100)
tree0342f436068c0779bda386a820c9a1cf2ebe47dc
parent8e9c06627df461e59c21d1086f18f96077c9acd4
util: add check for size validity (Coverity #50224)

As pointed by Coverity, when reading the size of data using 'readmsg' that
size cannot be fully trusted (possibly in case of bugs in present case),
so this patch adds a check to ensure it is valid before continuing.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
util/wmsetbg.c