In my_MD5Final in mysys/md5.c, ctx is not properly zeroed as intended

Bug #1244154 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Invalid
Undecided
Unassigned
5.1
Fix Released
High
Laurynas Biveinis
5.5
Fix Released
Undecided
Unassigned
5.6
Invalid
Undecided
Unassigned

Bug Description

This is a copy of upstream http://bugs.mysql.com/bug.php?id=68909 for 5.1.

...
gcc -DDEFAULT_BASEDIR=\"/usr/local\" -DMYSQL_DATADIR="\"/usr/local/var\"" -DDEFAULT_CHARSET_HOME="\"/usr/local\"" -DSHAREDIR="\"/usr/local/share/mysql\"" -DDEFAULT_HOME_ENV=MYSQL_HOME -DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX -DDEFAULT_SYSCONFDIR="\"/usr/local/etc\"" -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -I. -Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror -Wdeclaration-after-statement -g -DSAFE_MUTEX -g -O2 -DUNIV_LINUX -DUNIV_LINUX -MT md5.o -MD -MP -MF .deps/md5.Tpo -c -o md5.o md5.c
md5.c: In function ‘my_MD5Final’:
md5.c:179:24: error: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
   memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
                        ^

Related branches

tags: added: ci low-hanging-fruit
tags: added: upstream
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3055

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.