Testing for NULL in shell_scanline

Fernando RUIZ CASAS (E-mail) fernando.ruiz at ctv.es
Wed Sep 12 13:12:38 UTC 2001


Thanks, It's my fault.

But it's the first time that I hear about this concern.

I will submmit the patch to Joel.

Another question?
Useful?
Have you used it with telnetd?

Fernando RUIZ CASAS
home:correo at fernando-ruiz.com
work:fernando.ruiz at ctv.es


> -----Mensaje original-----
> De: Andy Dachs [mailto:iwe at fsmail.net]
> Enviado el: miércoles, 12 de septiembre de 2001 14:21
> Para: correo at fernando-ruiz.com
> CC: rtems-users at oarcorp.com
> Asunto: Testing for NULL in shell_scanline
>
>
> Hi,
>
> In file c/src/libmisc/shell/shell.c near line 292 I think
> there should be a check to make sure that FILE* out is not
> NULL before calling tcdrain(fileno(out)) (out is NULL when
> entering a password).
>
> Unless I'm mistaken (again!) this is still a problem in
> snapshot ss-20010816.
>
> Regards,
> Andy
>
> /* ----------------------------------------------- *
>  * TODO: Add improvements. History, edit vi or emacs, ...
>  * ----------------------------------------------- */
> int shell_scanline(char * line,int size,FILE * in,FILE * out) {
>   int c,col;
>   col=0;
>   if (*line) {
>    col=strlen(line);
>    if (out) fprintf(out,"%s",line);
>   };
>   tcdrain(fileno(in ));
>   if( out )
>     tcdrain(fileno(out));
>
>
> Surrey Satellite Technology Limited
> http://www.sstl.co.uk
> The views expressed in this email are my own(isn't that reassuring?)
>
>
>
>
> ______________________________________________________________
> _________
> FSmail - Get your free web-based email from Freeserve: www.fsmail.net
>
>
>
>
>




More information about the users mailing list