Changeset 30825


Ignore:
Timestamp:
2012-03-05T18:52:46+01:00 (4 years ago)
Author:
jow
Message:

[package] iwinfo: fix integer overflow in assoclist rate reporting (#11073)

Location:
trunk/package/iwinfo
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/iwinfo/Makefile

    r30693 r30825  
    88 
    99PKG_NAME:=libiwinfo 
    10 PKG_RELEASE:=31 
     10PKG_RELEASE:=32 
    1111 
    1212PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) 
  • trunk/package/iwinfo/src/include/iwinfo.h

    r30693 r30825  
    6262 
    6363struct iwinfo_rate_entry { 
    64         uint16_t rate; 
     64        uint32_t rate; 
    6565        int8_t mcs; 
    6666        uint8_t is_40mhz:1; 
  • trunk/package/iwinfo/src/iwinfo_cli.c

    r30692 r30825  
    135135                snprintf(buf, sizeof(buf), "unknown"); 
    136136        else 
    137                 snprintf(buf, sizeof(buf), "%.1f MBit/s", ((float)rate / 1000.0)); 
     137                snprintf(buf, sizeof(buf), "%d.%d MBit/s", 
     138                        rate / 1000, (rate % 1000) / 100); 
    138139 
    139140        return buf; 
Note: See TracChangeset for help on using the changeset viewer.