PKGBUILDs/community/giac/format-security.patch
2022-11-05 00:08:40 +00:00

68 lines
3 KiB
Diff

diff -ru giac-1.9.0.orig/src/Graph.cc giac-1.9.0/src/Graph.cc
--- giac-1.9.0.orig/src/Graph.cc 2022-11-04 19:00:52.059786792 +0100
+++ giac-1.9.0/src/Graph.cc 2022-11-04 19:05:34.765503717 +0100
@@ -5640,7 +5640,7 @@
}
bool inputdouble(const char * msg,double & d,GIAC_CONTEXT){
- const char * ch=fl_input(msg,print_DOUBLE_(d).c_str());
+ const char * ch=fl_input("%s",msg,print_DOUBLE_(d).c_str());
if (!ch) return false;
gen g(ch,contextptr);
g=evalf_double(g,1,contextptr);
@@ -5779,14 +5779,14 @@
if (operation==2){ // root near curt
sol=newton(y,t,curt,NEWTON_DEFAULT_ITERATION,eps,1e-12,true,tmin._DOUBLE_val,tmax._DOUBLE_val,1,0,1,contextptr);
if (sol.type==_DOUBLE_){
- fl_alert((gettext("Root at ")+sol.print(contextptr)).c_str());
+ fl_alert("%s",(gettext("Root at ")+sol.print(contextptr)).c_str());
sto(sol,gen("Zero",contextptr),contextptr);
}
}
if (operation==4){ // horizontal tangent near curt
sol=newton(y1,t,curt,NEWTON_DEFAULT_ITERATION,eps,1e-12,true,tmin._DOUBLE_val,tmax._DOUBLE_val,1,0,1,contextptr);
if (sol.type==_DOUBLE_){
- fl_alert((gettext("y'=0, extremum/singular pt at ")+sol.print(contextptr)).c_str());
+ fl_alert("%s",(gettext("y'=0, extremum/singular pt at ")+sol.print(contextptr)).c_str());
sto(sol,gen("Extremum",contextptr),contextptr);
}
}
@@ -5796,7 +5796,7 @@
else {
sol=newton(x1,t,curt,NEWTON_DEFAULT_ITERATION,eps,1e-12,true,tmin._DOUBLE_val,tmax._DOUBLE_val,1,0,1,contextptr);
if (sol.type==_DOUBLE_){
- fl_alert((gettext("x'=0, vertical or singular: ")+sol.print(contextptr)).c_str());
+ fl_alert("%s",(gettext("x'=0, vertical or singular: ")+sol.print(contextptr)).c_str());
sto(sol,gen("Vertical",contextptr),contextptr);
}
}
@@ -5804,7 +5804,7 @@
if (operation==6){ // inflexion
sol=newton(x1*y2-x2*y1,t,curt,NEWTON_DEFAULT_ITERATION,eps,1e-12,true,tmin._DOUBLE_val,tmax._DOUBLE_val,1,0,1,contextptr);
if (sol.type==_DOUBLE_){
- fl_alert(("x'*y''-x''*y'=0: "+sol.print(contextptr)).c_str());
+ fl_alert("%s",("x'*y''-x''*y'=0: "+sol.print(contextptr)).c_str());
sto(sol,gen("Inflexion",contextptr),contextptr);
}
}
@@ -5826,9 +5826,9 @@
tracemode_disp.push_back(giac::eval(res,1,contextptr));
string ss=res.print(contextptr);
if (!tegral(f,t,a,b,1e-6,1<<10,res,false,contextptr))
- fl_alert((gettext("Numerical Integration Error: ")+ss).c_str());
+ fl_alert("%s",(gettext("Numerical Integration Error: ")+ss).c_str());
else {
- fl_alert((ss+": "+res.print(contextptr)).c_str());
+ fl_alert("%s",(ss+": "+res.print(contextptr)).c_str());
sto(res,gen((operation==9?"Area":"Arclength"),contextptr),contextptr);
}
}
@@ -5938,7 +5938,7 @@
curve_infos1 = f.print(contextptr)+": "+curve_infos1;
}
}
- fl_alert((curve_infos1+'\n'+curve_infos2).c_str());
+ fl_alert("%s",(curve_infos1+'\n'+curve_infos2).c_str());
}
tracemode_add="";
if (Gx.type==_DOUBLE_ && Gy.type==_DOUBLE_){