Bug 9062 - cmd_lsarpc.c:1171: bad call to data_blob_const
cmd_lsarpc.c:1171: bad call to data_blob_const
Status: RESOLVED FIXED
Product: Samba 3.6
Classification: Unclassified
Component: Client Tools
3.6.6
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-23 20:59 UTC by David Binderman
Modified: 2012-09-24 03:38 UTC (History)
0 users

See Also:


Attachments
git-am fix for 3.6.next. (1.11 KB, patch)
2012-07-23 22:26 UTC, Jeremy Allison
gd: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2012-07-23 20:59:11 UTC
I just ran the static analysis checker cppcheck over the source
code of samba-3.6.6

It said

[rpcclient/cmd_lsarpc.c:1171]: (error) Using sizeof for array given as function argument returns the size of pointer.

The source code is

    DATA_BLOB session_key_blob = data_blob_const(session_key, sizeof(session_key));

I think you might be better off with

    DATA_BLOB session_key_blob = data_blob_const(session_key, 16 * sizeof(uint8_t));
Comment 1 Jeremy Allison 2012-07-23 22:26:22 UTC
Created attachment 7717 [details]
git-am fix for 3.6.next.

Fix from submitter.
Comment 2 Jeremy Allison 2012-07-24 23:27:58 UTC
Comment on attachment 7717 [details]
git-am fix for 3.6.next.

Obvious goodness.
Comment 3 Guenther Deschner 2012-07-25 14:59:50 UTC
Comment on attachment 7717 [details]
git-am fix for 3.6.next.

looks good
Comment 4 Jeremy Allison 2012-07-25 20:00:59 UTC
Re-assigning to Karolin for inclusion in 3.6.next.
Jeremy.
Comment 5 Karolin Seeger 2012-07-26 17:13:33 UTC
Pushed to v3-6-test.
Closing out bug report.

Thanks!