summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-09-25 04:23:35 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-09-25 04:23:35 +0000
commit4eee66a4cfe62b0b505a32673c6af9a2ea0d588e (patch)
tree12db95b82f09ab29fa34e9f1bb82d7400a6326f0 /apps/gui
parent89041f6b4a14cf1ac4eaca2ccb462d0eab8909a6 (diff)
downloadrockbox-4eee66a4cfe62b0b505a32673c6af9a2ea0d588e.tar.gz
rockbox-4eee66a4cfe62b0b505a32673c6af9a2ea0d588e.zip
r22826 is causing data aborts when the wps is loaded in the parse_list function - suspected reason is an improperly aligned pointer depending on how the buffer gets setup when translating a "d".
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22827 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/skin_engine/skin_parser.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index b03bdb013d..ede1871414 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -983,9 +983,18 @@ static int parse_albumart_load(const char *wps_bufptr,
983 return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl7 */ 983 return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl7 */
984 984
985 _pos = wps_bufptr + 1; 985 _pos = wps_bufptr + 1;
986 _pos = parse_list("dd", NULL, '|', _pos, &aa->albumart_x, &aa->albumart_y); 986 if (!isdigit(*_pos))
987 return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl|@ */
988 aa->albumart_x = atoi(_pos);
987 989
988 if (!_pos || _pos > newline || *_pos != '|') 990 _pos = strchr(_pos, '|');
991 if (!_pos || _pos > newline || !isdigit(*(++_pos)))
992 return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl|7\n or %Cl|7|@ */
993
994 aa->albumart_y = atoi(_pos);
995
996 _pos = strchr(_pos, '|');
997 if (!_pos || _pos > newline)
989 return WPS_ERROR_INVALID_PARAM; /* malformed token: no | after y coordinate 998 return WPS_ERROR_INVALID_PARAM; /* malformed token: no | after y coordinate
990 e.g. %Cl|7|59\n */ 999 e.g. %Cl|7|59\n */
991 1000