[Pkg-wmaker-commits] [wmbubble] 56/207: Catch invalid colors
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 24 04:18:02 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmbubble.
commit 97d79c3c101db024f96166f9be3c82412393646a
Author: Robert Jacobs <rnjacobs at mit.edu>
Date: Thu Aug 4 22:52:25 2011 -0700
Catch invalid colors
---
bubblemon.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/bubblemon.c b/bubblemon.c
index ee6c258..5fb35ad 100644
--- a/bubblemon.c
+++ b/bubblemon.c
@@ -279,8 +279,14 @@ void bubblemon_session_defaults(XrmDatabase x_resource_database)
*(double *) x_resource_extras[i].write_to = strtod(val.addr,NULL);
break;
case Is_Color:
- XParseColor(wmxp_display,DefaultColormap(wmxp_display,DefaultScreen(wmxp_display)),
- val.addr, &colorparsing);
+ if (XParseColor(wmxp_display,
+ DefaultColormap(wmxp_display,
+ DefaultScreen(wmxp_display)),
+ val.addr, &colorparsing) == 0) {
+ fprintf(stderr,"Couldn't parse color %s for control %s\n",
+ val.addr,x_resource_extras[i].option);
+ exit(-3);
+ }
*(int *) x_resource_extras[i].write_to =
((colorparsing.red & 0xFF00) << 8) |
((colorparsing.green & 0xFF00)) |
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbubble.git
More information about the Pkg-wmaker-commits
mailing list