Bug 92434 - Expression 'call_id < 0' is always false
Summary: Expression 'call_id < 0' is always false
Status: RESOLVED FIXED
Alias: None
Product: p11-glue
Classification: Unclassified
Component: p11-kit (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Stef Walter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-12 05:12 UTC by Pankaj
Modified: 2015-10-19 08:19 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
p11-kit-0.23.1-rpc-message (517 bytes, patch)
2015-10-12 05:12 UTC, Pankaj
Details | Splinter Review

Description Pankaj 2015-10-12 05:12:03 UTC
Created attachment 118830 [details] [review]
p11-kit-0.23.1-rpc-message

Hi, 
The issues reported for logically - 'always false' in the code.
where 'call_id' is type of uint32_t which never will be less than 0;
at line  :p11-kit-0.23.1/p11-kit/rpc-message.c:171

the respective patch has been also attached ,please review it .
===============================================================
--- a/p11-kit-0.23.1/p11-kit/rpc-message.c      2014-12-16 15:54:01.000000000 +0530
+++ b/p11-kit-0.23.1/p11-kit/rpc-message.c      2015-10-12 10:12:27.733046227 +0530
@@ -171,7 +171,7 @@
        msg->signature = msg->sigverify = NULL;

        /* The call id and signature */
-       if (call_id < 0 || call_id >= P11_RPC_CALL_MAX) {
+       if (call_id >= P11_RPC_CALL_MAX) {
                p11_message ("invalid message: bad call id: %d", call_id);
                return false;
        }

Thanks ,
Pankaj Sharma
Comment 1 Stef Walter 2015-10-19 08:19:39 UTC
Thanks. Pushed to git master.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.