Changeset e075b388 in rtems


Ignore:
Timestamp:
Sep 5, 2013, 6:10:52 PM (6 years ago)
Author:
Gedare Bloom <gedare@…>
Branches:
4.11, master
Children:
97ae1eeb
Parents:
b6cfbab4
Message:

untar: check return value from mkdir

Check the return value from mkdir instead of failing silently.

1063857 Unchecked return value from library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/untar/untar.c

    rb6cfbab4 re075b388  
    224224      else if (linkflag == DIRTYPE)
    225225      {
    226          mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO);
     226         if ( mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO) != 0 ) {
     227           printk("Untar: failed to create directory %s\n", fname);
     228           retval = UNTAR_FAIL;
     229           break;
     230         }
    227231      }
    228232   }
Note: See TracChangeset for help on using the changeset viewer.