Re: C scripting (continued)
- From: Richard Heathfield <rjh@xxxxxxxxxxxxxxx>
- Date: Wed, 01 Apr 2009 03:05:32 +0000
jacob navia said:
Keith Thompson wrote:
jacob navia <jacob@xxxxxxxxxx> writes:
The main complaints about the version of a C script I presented
in this forum were:
(1) Limited buffers could overflow
(2) Security issues concerning specially crafted file names
(3) Blatant unacknowledged non-portability.
The code will compile and run under windows and unix...
Not as posted, it won't.
Just change ls by dir.
And make sure you specify the right arguments to dir. And fix the
syntax error Keith mentioned. And fix the memory leak that you
yourself mentioned. And fix the dependency on gcc. (Not everyone
has gcc installed, you know.) And fix the dependency on lcc. (Not
everyone has lcc installed, you know. And those who do have it
installed don't necessarily have it installed in the same place on
their filesystem that you do.)
And who told you that I am interested in more
portability than that?
If you want comp.compilers.lcc you know where to find it.
I do not want to run in a coffee machine pelase.
How do you feel about Macs? Mainframes? Amigas? ARMs? There are lots
of machines in the world that are non-Unix non-Windows which still
have filesystems and interactive I/O devices (i.e. are rather more
sophisticated than your typical coffee machine).
Those issues were not at all any problem in the environment[...]
where this script was used but from a more general perspective
they could be an issue.
char *buf,*p,char cmd[1024];
This is a syntax error.
Yes. I reformated for posting to avoid line breaks.
A program that introduces syntax errors when it re-formats code
isn't worth having. If you did the re-format by hand, one cannot
help wondering why.
<snip>
Your own lcc-win compiler (at least the Windows version)
diagnoses
both these problems. Why are you posting code that you haven't
even compiled?
No, I did not compile the message I compiled the code that I later
reformatted to allow for better reading.
If I understand you correctly, you did this:
(a) wrote the code
(b) compiled the code
(c) tested the code
(d) modified the code
(e) posted the modified code
So the code you actually posted, the code that resulted from your
modifications, was not code that you had compiled. This is Keith's
claim, and it is a claim that you have denied. Do you still deny
it? If you *did* compile the code you posted, why didn't you notice
the syntax error that the compiler complained about?
And that is all you have to say?
A syntax error is all he /has/ to say, and it speaks volumes.
Vacuous, like all your answers. Never go into the subject, just
go on picking some small point and tripping there.
Keith has already answered this point, so I'll leave it there.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.
- Prev by Date: Re: char type size
- Next by Date: Re: Corrected: Proposal: Increasing type safety with a keyword
- Previous by thread: Re: C scripting (continued)
- Next by thread: Re: C scripting (continued)
- Index(es):
Relevant Pages
|