aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-03-12 19:54:07 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-03-12 19:54:07 -0500
commite6d8a514e53474f58f5ea315776298512e501c49 (patch)
treefca78281fe90df878a4d42c750f1ad050dbfae44
parentec7981d1a89f5c4a87b0a3d0e3ca8e07cc178f9a (diff)
parent256988db2ddd0999cc64f55250062f0382b6cf49 (diff)
downloadayatana-indicator-application-e6d8a514e53474f58f5ea315776298512e501c49.tar.gz
ayatana-indicator-application-e6d8a514e53474f58f5ea315776298512e501c49.tar.bz2
ayatana-indicator-application-e6d8a514e53474f58f5ea315776298512e501c49.zip
in generate_id(), we have a handful of local guint8's that get left-shifted to the point of potential overflow -- so change them to guint32 instead. Bug reported by coverity in lp ticket #944234
-rw-r--r--src/generate-id.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/generate-id.c b/src/generate-id.c
index 14d762e..9515860 100644
--- a/src/generate-id.c
+++ b/src/generate-id.c
@@ -26,10 +26,10 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
guint32
generate_id (const AppIndicatorCategory catenum, const gchar * id)
{
- guchar category = 0;
- guchar first = 0;
- guchar second = 0;
- guchar third = 0;
+ guint32 category = 0;
+ guint32 first = 0;
+ guint32 second = 0;
+ guint32 third = 0;
switch (catenum) {
case APP_INDICATOR_CATEGORY_OTHER: