Répondre à : Erreur maxima

Accueil Forums Programmation WIMS Programmation d’exercices OEF Erreur maxima Répondre à : Erreur maxima

#3348
jm.evers
Participant
Up
0
Down
::

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);
}