#61 flagset.c/netcat_flag_count() fails with unsigned char type

closed-duplicate
6
2012-12-21
2012-12-21
No

src/flagset.c/netcat_flag_count() does not work if "char" type defaults to unsigned char. This is true for certain platforms.

The fix is to explicitly specify the variable signedness:

--- netcat-0.7.1/src/flagset.c 2003-12-10 18:18:07.000000000 +0200
+++ netcat-0.7.1-fixed/src/flagset.c 2012-12-21 13:18:46.079676403 +0200
@@ -134,7 +134,7 @@

int netcat_flag_count(void)
{
- register char c;
+ register signed char c;
register int i;
int ret = 0;

Discussion

  • Harry Sintonen

    Harry Sintonen - 2012-12-21
    • priority: 5 --> 6
    • assigned_to: nobody --> themnemonic
     
  • Harry Sintonen

    Harry Sintonen - 2012-12-21

    Dupe of 3196063... but it still is not fixed in trunk. Why not?

     
  • Harry Sintonen

    Harry Sintonen - 2012-12-21
    • status: open --> closed-duplicate
     

Log in to post a comment.