Changeset d40294 in git


Ignore:
Timestamp:
Jun 17, 2011, 9:47:28 AM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
0777eaa5b4d2cac6ca8635f3d96e331a60032554
Parents:
2f128f2c3244812fa0ad92434c4ccb623b9c7b56
Message:
fix NULL deref.

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

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    r2f128f2 rd40294  
    195195    for (int c = 0; c < n; c++)
    196196    {
    197       entry = p_GetCoeff(MATELEM(singularMatrix, r + 1, c + 1), currRing);
    198       int entryAsInt = n_Int(entry, currRing);
    199       if (entryAsInt < 0) entryAsInt += currRing->ch;
     197      poly p=MATELEM(singularMatrix, r + 1, c + 1);
     198      int entryAsInt;
     199      if (p!=NULL)
     200      {
     201        entry = p_GetCoeff(p, currRing);
     202        entryAsInt = n_Int(entry, currRing);
     203        if (entryAsInt < 0) entryAsInt += currRing->ch;
     204      }
     205      else
     206        entryAsInt=0;
    200207      longMatrix[r][c] = (unsigned long)entryAsInt;
    201208    }
Note: See TracChangeset for help on using the changeset viewer.