Changeset 09d4f62 in rtems for cpukit/libblock


Ignore:
Timestamp:
Oct 30, 2015, 12:00:01 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
08a807b0
Parents:
65243416
git-author:
Sebastian Huber <sebastian.huber@…> (10/30/15 12:00:01)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/02/15 07:21:49)
Message:

libblock: Avoid NULL pointer access

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/src/media.c

    r65243416 r09d4f62  
    204204    if (
    205205      (disk_path == NULL || strcmp(disk_path, item->disk_path) == 0)
    206         && (mount_path == NULL || strcmp(mount_path, item->mount_path) == 0)
     206        && (mount_path == NULL
     207          || (item->mount_path != NULL
     208            && strcmp(mount_path, item->mount_path) == 0))
    207209    ) {
    208210      return item;
Note: See TracChangeset for help on using the changeset viewer.