[hipl-commit] [trunk] Rev 4745: firewall: fix a signed/unsigned comparison in midauth code.

  • From: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Wed, 9 Jun 2010 17:14:16 +0300

Committer: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
Date: 09/06/2010 at 17:14:16
Revision: 4745
Revision-id: mircea.gherzan@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  firewall: fix a signed/unsigned comparison in midauth code.

Modified:
  M  firewall/midauth.c

=== modified file 'firewall/midauth.c'
--- firewall/midauth.c  2010-06-09 14:05:14 +0000
+++ firewall/midauth.c  2010-06-09 14:13:53 +0000
@@ -277,7 +277,7 @@
     len       = hip_get_param_total_len(last);
     type      = hip_get_param_type(last);
 
-    HIP_IFEL(len > sizeof(buffer), -1,
+    HIP_IFEL(len > (int)sizeof(buffer), -1,
              "Last parameter's length exceeds HIP_MAX_PACKET\n");
 
     /* @todo check for signature parameter to avoid broken packets */

Other related posts:

  • » [hipl-commit] [trunk] Rev 4745: firewall: fix a signed/unsigned comparison in midauth code. - Mircea Gherzan