[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:54:32 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit bf31b20bb9d270f3ce7c7e24872a1a87502b233e
Author: Hans Schoenemann <hannes at mathematik.uni-kl.de>
Date:   Thu Mar 29 17:33:18 2012 +0200

    fix: NULL deref in newstruct

diff --git a/Singular/newstruct.cc b/Singular/newstruct.cc
index 8d00cfa..ba1b357 100644
--- a/Singular/newstruct.cc
+++ b/Singular/newstruct.cc
@@ -180,10 +180,11 @@ BOOLEAN newstruct_Op2(int op, leftv res, leftv a1, leftv a2)
 {
   // interpreter: a1 or a2 is newstruct
   blackbox *a=getBlackboxStuff(a1->Typ());
-  newstruct_desc nt=(newstruct_desc)a->data;
+  newstruct_desc nt;
   lists al=(lists)a1->Data();
   if (a!=NULL)
   {
+    nt=(newstruct_desc)a->data;
     switch(op)
     {
       case '.':
@@ -274,8 +275,8 @@ BOOLEAN newstruct_Op2(int op, leftv res, leftv a1, leftv a2)
   else
   {
     a=getBlackboxStuff(a2->Typ());
-    lists al=(lists)a2->Data();
     nt=(newstruct_desc)a->data;
+    lists al=(lists)a2->Data();
   }
   newstruct_proc p=nt->procs;
   while((p!=NULL) &&(p->t=op)&&(p->args!=2)) p=p->next;

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list