WMaker: rewrote generation of title for the Icon Chooser to avoid problems
commit92ecb3c3ed0bceb44bfb2e5c9ef61a45154a9154
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 17 May 2014 18:18:21 +0000 (17 20:18 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 18 May 2014 22:00:16 +0000 (18 23:00 +0100)
treee1f6fa620ea7cf10627c341b5d22e75ecb8a4699
parentaa1ee24fc03a1128a3a59e1440acd88df0696199
WMaker: rewrote generation of title for the Icon Chooser to avoid problems

The original code did have a few weaknesses, including:
 - possible buffer overflow, if the translation was too long;
 - possible crash, if either instance or class is NULL but not both

Now the appropriate length is calculated (not counting on a margin) and the
string is generated with the available elements.

As a side note, the variable was renamed from 'tmp' to 'title' for clarity.

This was highlighted by cppcheck (thanks to David Maciejak) and by
Coverity (bug #50078).

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