#10993: Update eclib to latest upstream release
-----------------------------------+----------------------------------------
       Reporter:  cremona          |         Owner:  cremona                    
     
           Type:  enhancement      |        Status:  needs_review               
     
       Priority:  major            |     Milestone:  sage-5.0                   
     
      Component:  packages         |    Resolution:                             
     
       Keywords:  elliptic curves  |   Work issues:  ldconfig in spkg-install   
     
Report Upstream:  N/A              |     Reviewers:  Frithjof Schulze, Jeroen 
Demeyer
        Authors:  John Cremona     |     Merged in:                             
     
   Dependencies:  #11354           |      Stopgaps:                             
     
-----------------------------------+----------------------------------------

Comment (by leif):

 W.r.t. your latest upstream changes:
 {{{
 #!diff
 --- eclib-20120417.p0/src/libsrc/moddata.cc     2012-04-17
 11:07:17.000000000 +0200
 +++ eclib-20120417.p1/src/libsrc/moddata.cc     2012-04-17
 16:19:27.000000000 +0200
 @@ -146,3 +146,15 @@
   cout << "unitdivlist: " << unitdivlist << endl;
  }

 +char* nf_filename(long n, char c)
 +{
 +  char* nf_dir = getenv("NF_DIR");
 +  string nf_file;
 +  if (nf_dir==NULL)
 +    nf_file = string("./newforms");
 +  else
 +    nf_file = string(nf_dir);
 +  char* filename=new char[nf_file.length()+20];
 +  sprintf(filename,"%s/%c%ld",nf_file.c_str(),c,n);
 +  return filename;
 +}
 }}}

 The `filename` string buffer might still overflow, since `/%c%ld`
 (including a terminating `\0`) can have up to 23 characters (1+1+20+1).
 One usually allocates a few more bytes than needed, as `sprintf()` is said
 to need some "scratch space" in addition (at least some implementations
 may).

 Otherwise positive review modulo testing on Cygwin (if needed).

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10993#comment:112>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to