Changeset d5a2cf in git


Ignore:
Timestamp:
Jun 11, 2021, 9:53:33 AM (3 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
4c08ef2756f6d5d5ef952218f214fe69fa425bf3
Parents:
347844956cb3c4fafa4ba82341de7e0c3993dfb7
Message:
port from archived branch master: SINGULAR_PATH_LENGTH
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iplib.cc

    r347844 rd5a2cf  
    1717#include "Singular/fevoices.h"
    1818#include "Singular/lists.h"
     19
     20#ifndef SINGULAR_PATH_LENGTH
     21#define SINGULAR_PATH_LENGTH 512
     22#endif
    1923
    2024#include <ctype.h>
     
    193197char* iiGetLibProcBuffer(procinfo *pi, int part )
    194198{
    195   char buf[256], *s = NULL, *p;
     199  char buf[SINGULAR_PATH_LENGTH], *s = NULL, *p;
    196200  long procbuflen;
    197201
     
    13661370    package s=currPack;
    13671371    currPack=IDPACKAGE(pl);
    1368     char buff[256];
    1369     buff[255]='\0';
    1370     strncpy(buff,p,255);
    1371     strncat(buff,"_help",255-strlen(p));
     1372    char buff[SINGULAR_PATH_LENGTH];
     1373    buff[SINGULAR_PATH_LENGTH-1]='\0';
     1374    strncpy(buff,p,SINGULAR_PATH_LENGTH-1);
     1375    strncat(buff,"_help",SINGULAR_PATH_LENGTH-1-strlen(p));
    13721376    idhdl h=enterid(buff,0,STRING_CMD,&IDROOT,FALSE);
    13731377    IDSTRING(h)=omStrDup(help);
Note: See TracChangeset for help on using the changeset viewer.