> The second argument to scanf in the line
>
> scanf("%s", &filename);
>
> needs to be a pointer to a char ARRAY large enough to hold the input. The
> way it is, you are overwriting memory. The fact that is works on digital
> unix is just a fluke.
Not only that, if filename is defined as a pointer to char, then that
& in there is spurious, and he's doing an extra unwanted dereference, and
as such will really be overwriting memory he doesn't want to be. :)
> Michael
------------------------------------------------------------------------
David E. Fox Tax Thanks for letting me
[EMAIL PROTECTED] the change magnetic patterns
[EMAIL PROTECTED] churches on your hard disk.
-----------------------------------------------------------------------
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.