Changeset 5610


Ignore:
Timestamp:
Aug 3, 2009, 11:05:08 AM (15 years ago)
Author:
Christoph Mayer
Message:

length check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp

    r5447 r5610  
    146146        sdp_session_ = 0;
    147147
     148        if((name.length() > 256) || (info1.length() > 256) || (info2.length() > 256) || (info3.length() > 256)) {
     149                logging_error("string argument too long, max size is 256");
     150                return;
     151        }
     152
    148153        // prepare the info attribute buffers
    149154        //string namebuf, info1buf, info2buf, info3buf;
     
    154159        info2len = (uint8_t)info2.length();
    155160        info3len = (uint8_t)info3.length();
    156 
    157         if((namelen > 256) || (info1len > 256) || (info2len > 256) || (info3len > 256)) {
    158                 logging_error("string argument too long, max size is 256!");
    159                 return;
    160         }
    161161
    162162        // set the general service ID
Note: See TracChangeset for help on using the changeset viewer.