Changeset d11bb1 in git for Singular/fehelp.cc


Ignore:
Timestamp:
Sep 13, 2004, 5:41:33 PM (20 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
74162eba2d3f35dd123f55f9ab68878f90f46f29
Parents:
fd19918f854ac98e47302698e9bddb1987360d33
Message:
*hannes: buffer overfl. at idx scan


git-svn-id: file:///usr/local/Singular/svn/trunk@7467 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/fehelp.cc

    rfd19918 rd11bb1  
    44/*
    55* ABSTRACT: help system
    6 * versin $Id: fehelp.cc,v 1.38 2003-05-31 14:13:06 Singular Exp $
     6* versin $Id: fehelp.cc,v 1.39 2004-09-13 15:41:33 Singular Exp $
    77*/
    88
     
    3030 *
    3131 *****************************************************************/
    32 #define MAX_HE_ENTRY_LENGTH 60
     32#define MAX_HE_ENTRY_LENGTH 160
    3333typedef struct
    3434{
     
    607607  fd = fopen(filename, "r");
    608608  if (fd == NULL) return 0;
     609  memset(index_key,0,MAX_HE_ENTRY_LENGTH);
    609610  while (fscanf(fd, "%[^\t]\t%*[^\n]\n", index_key) == 1)
    610611  {
    611     if (strmatch(index_key, key))
     612    if (index_key[MAX_HE_ENTRY_LENGTH]!='\0')
     613    {
     614      WerrorS("index file corrupt");
     615      break;
     616    }
     617    else if (strmatch(index_key, key))
    612618    {
    613619      i++;
Note: See TracChangeset for help on using the changeset viewer.