Changeset 1126


Ignore:
Timestamp:
04/04/11 03:25:45 (2 years ago)
Author:
reyalP
Message:

prevent dryos cams from asserting on fopen with bad file names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platform/generic/wrappers.c

    r1124 r1126  
    320320int open (const char *name, int flags, int mode ) 
    321321{ 
    322 #ifdef CAM_DRYOS_2_3_R39 
    323     if(name[0]!='A')return -1; 
     322#ifdef CAM_DRYOS 
     323    if(!name || name[0]!='A') 
     324        return -1; 
    324325#endif 
    325326#if defined(CAM_STARTUP_CRASH_FILE_OPEN_FIX)    // enable fix for camera crash at startup when opening the conf / font files 
     
    389390 
    390391long fopen(const char *filename, const char *mode) { 
     392#ifdef CAM_DRYOS 
     393    if(!filename || filename[0]!='A') { 
     394        return 0; 
     395    } 
     396#endif 
    391397    return _Fopen_Fut(filename,mode); 
    392398} 
Note: See TracChangeset for help on using the changeset viewer.