Accueil › Forums › Programmation WIMS › Programmation d’exercices OEF › Erreur maxima › Répondre à : Erreur maxima
28 avril 2016 à 08:31
#3348
Participant
::
Hi,
this is no bug…just a security measure.
kind regards,
Joke
from maxima.c
/* check for security violations in command string */
void check_parm(char *pm)
{
char *s, *pp;
int l;
/* Underscore replacement */
for(pp=strchr(pm,'_'); pp!=NULL; pp=strchr(pp+1,'_')) *pp='K';
/* '?' escapes to Lisp commands. */
if(strchr(pm,'?')!=NULL) {
fprintf(stderr,"Illegal under WIMS.\n"); exit(1);
}
for(s=pm;*s;s++) *s=tolower(*s);
strip_trailing_spaces2(pm); l=strlen(pm);
if(l>0 && pm[l-1]!=';') strcat(pm,";");
find_illegal(pm);
}