diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2016-09-21 11:09:43 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-09-21 11:20:33 +0000 |
commit | 7be73201a044e8228de8e91a5f8708ebcd761015 (patch) | |
tree | 0452abb66c23d9c8f273828e94e04e0460c9c926 /epan/dissectors/packet-btl2cap.c | |
parent | c2c8dc38fee6d33a2e926aa05a3e3f7ef1723db2 (diff) |
BTL2AP: compare strings with strcmp, not memcp
Otherwise a string shorter than 7 characters will trigger an out of bounds access
Bug: 12825
Change-Id: I54a7909d74838dcb56583374e5753f877ff74fe2
Reviewed-on: https://code.wireshark.org/review/17826
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'epan/dissectors/packet-btl2cap.c')
-rw-r--r-- | epan/dissectors/packet-btl2cap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c index db4c309f73..355e715583 100644 --- a/epan/dissectors/packet-btl2cap.c +++ b/epan/dissectors/packet-btl2cap.c @@ -22,7 +22,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -1889,7 +1888,7 @@ dissect_disconnrequestresponse(tvbuff_t *tvb, int offset, packet_info *pinfo, service_name = val_to_str_ext_const(uuid.bt_uuid, &bluetooth_uuid_vals_ext, "Unknown"); } - if (memcmp(service_name, "Unknown", 7) == 0) { + if (strcmp(service_name, "Unknown") == 0) { service_name = val_to_str_const(psm, psm_vals, "Unknown"); } |