Changeset 12b5264 in rtems


Ignore:
Timestamp:
10/30/15 12:00:01 (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11
Children:
0c9bf40b
Parents:
b2d788b3
git-author:
Sebastian Huber <sebastian.huber@…> (10/30/15 12:00:01)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/02/15 07:23:17)
Message:

libblock: Avoid NULL pointer access

File:
1 edited

Legend:

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

    rb2d788b3 r12b5264  
    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.