Bug 10216 - package/x11r7/mcookie/mcookie.c:207: bad size ?
Summary: package/x11r7/mcookie/mcookie.c:207: bad size ?
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 minor
Target Milestone: ---
Assignee: Bernd Kuhls
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-09 20:26 UTC by David Binderman
Modified: 2018-01-12 18:59 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2017-08-09 20:26:15 UTC
buildroot-2017.08-rc1/package/x11r7/mcookie/mcookie.c:207]: (warning) Size of pointer 'ctx' used instead of size of its data.

Source code is

    memset(ctx, 0, sizeof(ctx));    /* In case it's sensitive */

Maybe better code

    memset(ctx, 0, sizeof(*ctx));    /* In case it's sensitive */
Comment 1 Bernd Kuhls 2017-09-25 19:03:16 UTC
Thanks to your bug report I noticed that mcookie is part of util-linux:
https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/misc-utils

Therefore I plan to submit a patch to buildroot that removes the mcookie package in favour of util-linux which actively maintains mcookie:
https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/log/misc-utils/mcookie.c

If your bug report is still valid with upstream then please send your bug report to https://github.com/karelzak/util-linux
Comment 2 Peter Korsgaard 2017-09-26 10:36:41 UTC
FYI, this specific issue was fixed upstream (util-linux) back in 2009:

https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/lib/md5.c?id=6596057175c6ed342dc20e85eae8a42eb29b629f

I'll fix up our embedded mcookie.c copy as well for 2017.02.7 and 2017.08.1. Moving forward, it indeed makes more sense to use the util-linux version.
Comment 3 Thomas Petazzoni 2018-01-10 21:30:36 UTC
(In reply to Bernd Kuhls from comment #1)
Bernd, did you ever got around to submitting the patch removing the mcookie package, and switching to the one from util-linux instead?