Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Please help, my program doesn't work! (http://www.velocityreviews.com/forums/t754623-please-help-my-program-doesnt-work.html)

Mihai Moldovan 10-04-2011 03:18 PM

Please help, my program doesn't work!
 
Hello dear readers,

My program segfaults when I run it on my server: http://pastie.org/2637933

Please anyone know the issue?

You can reach me at ionic@ionic.de

Thanks!

~Ionic/Mihai

nroberts 10-04-2011 03:58 PM

Re: Please help, my program doesn't work!
 
On Oct 4, 8:18*am, Mihai Moldovan <io...@ionic.de> wrote:
> Hello dear readers,
>
> My program segfaults when I run it on my server:http://pastie.org/2637933
>
> Please anyone know the issue?
>
> You can reach me at io...@ionic.de
>
> Thanks!
>
> ~Ionic/Mihai


No null terminator in the_actual_truth. This is clearly an issue, and
I'd guess it's the issue you're having.

Angel 10-04-2011 04:41 PM

Re: Please help, my program doesn't work!
 
On 2011-10-04, Mihai Moldovan <ionic@ionic.de> wrote:
> Hello dear readers,
>
> My program segfaults when I run it on my server: http://pastie.org/2637933
>
> Please anyone know the issue?
>
> You can reach me at ionic@ionic.de
>
> Thanks!
>
> ~Ionic/Mihai


puts() expects a zero-terminated string. Your array of unsigned char
is not zero-terminated, so most likely the puts() call will veer outside
allocated memory while looking for the \0 and thus generate a segfault.

There are a couple of other issues with your program as well, but I'm
sure the others here can point them out better than I can.


--
"C provides a programmer with more than enough rope to hang himself.
C++ provides a firing squad, blindfold and last cigarette."
- seen in comp.lang.c

Ike Naar 10-04-2011 05:00 PM

Re: Please help, my program doesn't work!
 
On 2011-10-04, nroberts <roberts.noah@gmail.com> wrote:
> On Oct 4, 8:18?am, Mihai Moldovan <io...@ionic.de> wrote:
>> Hello dear readers,
>>
>> My program segfaults when I run it on my server:http://pastie.org/2637933
>>
>> Please anyone know the issue?
>>
>> You can reach me at io...@ionic.de
>>
>> Thanks!
>>
>> ~Ionic/Mihai

>
> No null terminator in the_actual_truth. This is clearly an issue, and
> I'd guess it's the issue you're having.


Whatever the issue is, it's not that.
the_actual_truth[89] is a null terminator.

John Bode 10-04-2011 05:28 PM

Re: Please help, my program doesn't work!
 
On Oct 4, 12:00*pm, Ike Naar <i...@iceland.freeshell.org> wrote:
> On 2011-10-04, nroberts <roberts.n...@gmail.com> wrote:
>
> > On Oct 4, 8:18?am, Mihai Moldovan <io...@ionic.de> wrote:
> >> Hello dear readers,

>
> >> My program segfaults when I run it on my server:http://pastie.org/2637933

>
> >> Please anyone know the issue?

>
> >> You can reach me at io...@ionic.de

>
> >> Thanks!

>
> >> ~Ionic/Mihai

>
> > No null terminator in the_actual_truth. *This is clearly an issue, and
> > I'd guess it's the issue you're having.

>
> Whatever the issue is, it's not that.
> the_actual_truth[89] is a null terminator.


The issue is that it's an epic troll.

At least if you're familiar with German.

Keith Thompson 10-04-2011 09:08 PM

Re: Please help, my program doesn't work!
 
Mihai Moldovan <ionic@ionic.de> writes:
> Hello dear readers,
>
> My program segfaults when I run it on my server: http://pastie.org/2637933
>
> Please anyone know the issue?
>
> You can reach me at ionic@ionic.de

[...]

I believe someone has forged Mihai Moldovan's name in an effort
to insult him. The program prints a stupid insult in German.
It doesn't segfault, and there *is* a null terminator in the
string being printed. The insulting message is not obvious from
the source code, presumably to trick readers into compiling and
running the program.

Mr. Moldovan: I have no idea what's going on, but if someone this
stupid hates you, you must be doing something right.

[Cc'ed to the apparent poster, who is probably the intended target of
the insult.]

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

Keith Thompson 10-05-2011 01:01 AM

Re: Please help, my program doesn't work!
 
Keith Thompson <kst-u@mib.org> writes:
> Mihai Moldovan <ionic@ionic.de> writes:
>> Hello dear readers,
>>
>> My program segfaults when I run it on my server: http://pastie.org/2637933
>>
>> Please anyone know the issue?
>>
>> You can reach me at ionic@ionic.de

> [...]
>
> I believe someone has forged Mihai Moldovan's name in an effort
> to insult him. The program prints a stupid insult in German.
> It doesn't segfault, and there *is* a null terminator in the
> string being printed. The insulting message is not obvious from
> the source code, presumably to trick readers into compiling and
> running the program.
>
> Mr. Moldovan: I have no idea what's going on, but if someone this
> stupid hates you, you must be doing something right.
>
> [Cc'ed to the apparent poster, who is probably the intended target of
> the insult.]


I got an e-mail response from Mihai Moldovan:

| Hello Keith,
|
| thanks for forwarding this, I was not aware of it.
|
| You are absolutely right, I did not post to the newsgroup.
| I suspect one (or for that matter, two) of my fellow students forged it.
| They know that for once I use pastie.org as my favorite pasting service
| and second made fun of my habit to include my mail address and telephone
| number in the copyright notice.
|
| Please disregard any more posts, whether alike the one you quoted or
| not, unless they are digitally signed with my certificate (S-MIME, as
| you can see in this message).
|
| Also, I would like you to forward this message to the newsgroup, if it's
| not too much trouble.
|
| Best regards,
|
|
| Mihai

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

Kleuskes & Moos 10-05-2011 02:49 PM

Re: Please help, my program doesn't work!
 
On Tue, 04 Oct 2011 10:28:35 -0700, John Bode wrote:

> On Oct 4, 12:00*pm, Ike Naar <i...@iceland.freeshell.org> wrote:
>> On 2011-10-04, nroberts <roberts.n...@gmail.com> wrote:
>>
>> > On Oct 4, 8:18?am, Mihai Moldovan <io...@ionic.de> wrote:
>> >> Hello dear readers,

>>
>> >> My program segfaults when I run it on my
>> >> server:http://pastie.org/2637933

>>
>> >> Please anyone know the issue?

>>
>> >> You can reach me at io...@ionic.de

>>
>> >> Thanks!

>>
>> >> ~Ionic/Mihai

>>
>> > No null terminator in the_actual_truth. *This is clearly an issue,
>> > and I'd guess it's the issue you're having.

>>
>> Whatever the issue is, it's not that. the_actual_truth[89] is a null
>> terminator.

>
> The issue is that it's an epic troll.
>
> At least if you're familiar with German.


The "epic" may be slightly exaggerated. Personally i think it's rather
pathetic. I've seen better provocations from 4 year olds

-------------------------------------------------------------------------------
_______________________________________
/ Psychoanalysis?? I thought this was a \
\ nude rap session!!! /
---------------------------------------
\
\
___
{~._.~}
( Y )
()~*~()
(_)-(_)
-------------------------------------------------------------------------------



All times are GMT. The time now is 05:31 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.