Changeset f22f22a in git


Ignore:
Timestamp:
Jan 14, 2017, 5:59:00 PM (6 years ago)
Author:
Volker Braun <vbraun.name@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5bec8f88c9ee2573d328cf7c3aff2bcb301d2395')
Children:
e85feda0c40361dfe1754b7c0fa791e33c600e71
Parents:
d22092faa534a77b8f85e33d87fee0070e584166
git-author:
Volker Braun <vbraun.name@gmail.com>2017-01-14 17:59:00+01:00
git-committer:
Volker Braun <vbraun.name@gmail.com>2017-01-14 17:59:38+01:00
Message:
fix: Increase library filename buffer length

Increase the buffer size from 128 to 1024 chars. E.g. Conda and Sage
intentionally build binaries with long (>100 chars) parent directories
to truncate them when installing the binaries. This caused random
segfaults, see https://trac.sagemath.org/ticket/22175
Location:
Singular
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/fehelp.cc

    rd22092f rf22f22a  
    703703  }
    704704
    705   char libnamebuf[128];
     705  char libnamebuf[1024];
    706706  FILE *fp=NULL;
    707707  // first, search for library of that name
  • Singular/iparith.cc

    rd22092f rf22f22a  
    51175117BOOLEAN jjLOAD(const char *s, BOOLEAN autoexport)
    51185118{
    5119   char libnamebuf[256];
     5119  char libnamebuf[1024];
    51205120  lib_types LT = type_of_LIB(s, libnamebuf);
    51215121
     
    51525152        currPack=IDPACKAGE(pl);
    51535153        IDPACKAGE(pl)->loaded=TRUE;
    5154         char libnamebuf[256];
     5154        char libnamebuf[1024];
    51555155        FILE * fp = feFopen( s, "r", libnamebuf, TRUE );
    51565156        BOOLEAN bo=iiLoadLIB(fp, libnamebuf, s, pl, autoexport, TRUE);
  • Singular/iplib.cc

    rd22092f rf22f22a  
    657657{
    658658  BOOLEAN LoadResult = TRUE;
    659   char libnamebuf[128];
     659  char libnamebuf[1024];
    660660  char *libname = (char *)omAlloc(strlen(id)+5);
    661661  const char *suffix[] = { "", ".lib", ".so", ".sl", NULL };
     
    673673      char *s=omStrDup(libname);
    674674      #ifdef HAVE_DYNAMIC_LOADING
    675       char libnamebuf[256];
     675      char libnamebuf[1024];
    676676      #endif
    677677
     
    718718BOOLEAN iiLibCmd( char *newlib, BOOLEAN autoexport, BOOLEAN tellerror, BOOLEAN force )
    719719{
    720   char libnamebuf[128];
     720  char libnamebuf[1024];
    721721  // procinfov pi;
    722722  // idhdl h;
  • Singular/libparse.cc

    rd22092f rf22f22a  
    10941094lib_cmds last_cmd = LP_NONE;
    10951095
    1096 char libnamebuf[128];
     1096char libnamebuf[1024];
    10971097char *text_buffer=NULL;
    10981098long string_start;
  • Singular/libparse.ll

    rd22092f rf22f22a  
    4545lib_cmds last_cmd = LP_NONE;
    4646
    47 char libnamebuf[128];
     47char libnamebuf[1024];
    4848char *text_buffer=NULL;
    4949long string_start;
Note: See TracChangeset for help on using the changeset viewer.