Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > strcpy

Reply
Thread Tools

strcpy

 
 
Ron Natalie
Guest
Posts: n/a
 
      06-03-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> thanks for those replies. I can use either of the approaches you
> mention. Portability wasn't part of the question so is not relevant at
> all.
>
> Is it possible also to write something into the string, say after the
> strcpy, so that when I try to read it again, it cores. something like;


It's still not clear what on earth you are trying to do. Invoking
undefined behavior is not something you can rely on the results, being
core dumps or otherwise.

Writing off the end of a "new'd" array probably WONT core dump
immediately. It will assuredly crash later the next time something
is allocated or deallocated.

Do you want to explain what it is you're trying to do? and what platform
you are "NOT CONCERNED ABOUT PORTABILITY" about.
 
Reply With Quote
 
 
 
 
Ron Natalie
Guest
Posts: n/a
 
      06-03-2005
(E-Mail Removed) wrote:
ainment.
>
> FYI I am debugging a distributed system whereby a string is passed from
> client to server. The string is inserted client side and extracted
> server side. I want the server unmarshalling code to fail with a core
> dump when it attempts to read the string. Hence the question.
>
> get a life you moron!


When you come here asking for free advice with a still ill-defined
problem, you should check the insulting attitude at the door.

You still haven't said what platform you want this abomination to
work on. I'm still unclear just what you are trying to do. Your
better bet would be to invoke some implemetnation defined method to
allocate read only memory or such if that's what you're trying to do.
 
Reply With Quote
 
 
 
 
GrahamJWalsh@gmail.com
Guest
Posts: n/a
 
      06-06-2005

OK, lets put this one to sleep.

1)

I replied to Alfie Steinbach who implied that i was writing malicious
code. Tosh! As I mentioned previously I really couldn't be ars*ed
spending a minute more than I need to in front of a terminal than is
absolutely necessary. Mr. Steinbach is paranoid.

2)

I was trying to reproduce a possible scenario where a string, when
extacted/unmarshalled on server side, could cause a core dump/crash
because of the contents of the string. That's all. I'm not flying
planes into the pentagon here.



thats all. The subject is closed. Geez.



G




Ron Natalie a écrit :
> (E-Mail Removed) wrote:
> ainment.
> >
> > FYI I am debugging a distributed system whereby a string is passed from
> > client to server. The string is inserted client side and extracted
> > server side. I want the server unmarshalling code to fail with a core
> > dump when it attempts to read the string. Hence the question.
> >
> > get a life you moron!

>
> When you come here asking for free advice with a still ill-defined
> problem, you should check the insulting attitude at the door.
>
> You still haven't said what platform you want this abomination to
> work on. I'm still unclear just what you are trying to do. Your
> better bet would be to invoke some implemetnation defined method to
> allocate read only memory or such if that's what you're trying to do.


 
Reply With Quote
 
Richard Herring
Guest
Posts: n/a
 
      06-06-2005
In message <(E-Mail Removed) .com>,
(E-Mail Removed) writes
>
>OK, lets put this one to sleep.


Please don't top-post.
>
>1)
>
>I replied to Alfie Steinbach


Did he say you could call him that?

>who implied that i was writing malicious
>code. Tosh! As I mentioned previously I really couldn't be ars*ed
>spending a minute more than I need to in front of a terminal than is
>absolutely necessary.


Protestations of innocence don't carry much weight in these parts,
particularly when accompanied by insults.

>Mr. Steinbach is paranoid.


ITYM "justifiably suspicious".

>
>2)
>
>I was trying to reproduce a possible scenario where a string, when
>extacted/unmarshalled on server side, could cause a core dump/crash
>because of the contents of the string.


You need to work on presentation. Compare and contrast the original
posting:

=====
>I want to make strcpy cause a core dump;

[...]
>what (if any) chacters ...of any any type can I put into "source" such
>that it will crash?


=====
which reads remarkably like a request for malware.

>That's all. I'm not flying
>planes into the pentagon here.


OK, so you're just posting off-topic questions. Questions about faulty
server code would be more appropriately answered in a group dedicated to
the appropriate server. Questions about C string functions are probably
better asked in a C group.

>
>thats all. The subject is closed. Geez.


This is Usenet. The subject is closed when nobody else feels like
contributing, not because you say so.

--
Richard Herring
 
Reply With Quote
 
GrahamJWalsh@gmail.com
Guest
Posts: n/a
 
      06-06-2005

Couldn't agree more Richie. This topic is closed.

G

Richard Herring a écrit :
> In message <(E-Mail Removed) .com>,
> (E-Mail Removed) writes
> >
> >OK, lets put this one to sleep.

>
> Please don't top-post.
> >
> >1)
> >
> >I replied to Alfie Steinbach

>
> Did he say you could call him that?
>
> >who implied that i was writing malicious
> >code. Tosh! As I mentioned previously I really couldn't be ars*ed
> >spending a minute more than I need to in front of a terminal than is
> >absolutely necessary.

>
> Protestations of innocence don't carry much weight in these parts,
> particularly when accompanied by insults.
>
> >Mr. Steinbach is paranoid.

>
> ITYM "justifiably suspicious".
>
> >
> >2)
> >
> >I was trying to reproduce a possible scenario where a string, when
> >extacted/unmarshalled on server side, could cause a core dump/crash
> >because of the contents of the string.

>
> You need to work on presentation. Compare and contrast the original
> posting:
>
> =====
> >I want to make strcpy cause a core dump;

> [...]
> >what (if any) chacters ...of any any type can I put into "source" such
> >that it will crash?

>
> =====
> which reads remarkably like a request for malware.
>
> >That's all. I'm not flying
> >planes into the pentagon here.

>
> OK, so you're just posting off-topic questions. Questions about faulty
> server code would be more appropriately answered in a group dedicated to
> the appropriate server. Questions about C string functions are probably
> better asked in a C group.
>
> >
> >thats all. The subject is closed. Geez.

>
> This is Usenet. The subject is closed when nobody else feels like
> contributing, not because you say so.
>
> --
> Richard Herring


 
Reply With Quote
 
Richard Herring
Guest
Posts: n/a
 
      06-06-2005
In message <(E-Mail Removed) .com>,
(E-Mail Removed) top-posted

[please don't top-post]

>
>Couldn't agree more Richie. This topic is closed.


So why are you still posting to this thread?

Now, what was your question about C++ again?

--
Richard Herring
 
Reply With Quote
 
GrahamJWalsh@gmail.com
Guest
Posts: n/a
 
      06-07-2005
The C++ question is closed. I've taken out the national grid of Ukraine
with my malicious c++ code.

Subject closed. No need for any more info. thanks anyways and have a
nice day.

Graham

 
Reply With Quote
 
sana1990 sana1990 is offline
Junior Member
Join Date: Apr 2010
Posts: 1
 
      04-21-2010
template <typename Type>
Node<Type> :: Node(Type x)
{

strcpy(value,x);

nextPtr = NULL;
}


this is not working the strcpy funtion is not working!!!!!!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
strcpy of a class object leonkatz@gmail.com C++ 11 01-20-2005 04:44 AM
strcpy and the copy constructor RonHiler C++ 8 10-19-2004 06:30 AM
C++ Compiler with a -Wwarn-use-of-strcpy or similar option?? Paul Sheer C++ 4 09-14-2004 08:38 PM
C++ Compiler with a -Wwarn-use-of-strcpy or similar option?? Paul Sheer C++ 7 09-10-2004 05:07 PM
strcpy Mike Mimic C++ 9 05-17-2004 08:12 PM



Advertisments