From: Mitchell Blank Jr <mitch@sfgoth.com>
To: Han Boetes <han@mijncomputer.nl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: propolice support for linux
Date: Thu, 13 Jan 2005 20:25:42 -0800 [thread overview]
Message-ID: <20050114042542.GB64314@gaz.sfgoth.com> (raw)
In-Reply-To: <20050113163733.GB14127@boetes.org>
Han Boetes wrote:
> And I got two warnings about `int __guard = '\0\0\n\777';'
>
> lib/propolice.c:15:15: warning: octal escape sequence out of range
Yeah, I have no idea what '\777' is supposed to be - that's 9 bits wide.
> lib/propolice.c:15:15: warning: multi-character character constant
Since the __guard symbol isn't used directly by C code it doesn't matter
what type it is, right? You should be able to just say something like:
unsigned char __guard[sizeof(int)] = { '\0', '\0', '\n', (unsighed char) -1 };
Or maybe you want those in the opposite order for endianness.. not sure.
Having the '\0' first in memory makes the most sense to me but I haven't
thought about it much.
> +static const char message[] = "propolice detects %x at function %s.\n";
> +
> +void __stack_smash_handler(int damaged, char func[])
1. "damaged" should be "unsigned int"; it's used with a "%x" format specifier
2. "func" should probably be "const char *func"
3. Why is message[] defined instead of just using it directly in the call
to panic like panic("blah blah...", ...) Maybe I'm missing something
subtle there.
-Mitch
next prev parent reply other threads:[~2005-01-14 4:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-13 13:46 Han Boetes
2005-01-13 14:04 ` Christoph Hellwig
2005-01-13 14:53 ` Arjan van de Ven
2005-01-13 16:37 ` Han Boetes
2005-01-13 17:02 ` Arjan van de Ven
2005-01-13 19:32 ` Han Boetes
2005-01-14 7:35 ` Arjan van de Ven
2005-01-13 17:07 ` Bill Davidsen
2005-01-13 17:31 ` Han Boetes
2005-01-13 17:58 ` Zwane Mwaikambo
2005-01-13 18:17 ` Han Boetes
2005-01-14 4:25 ` Mitchell Blank Jr [this message]
2005-01-14 10:30 ` Han Boetes
2005-01-15 2:25 ` Mitchell Blank Jr
2005-01-15 8:10 ` Han Boetes
2005-01-13 14:07 ` Arjan van de Ven
2005-01-13 14:15 ` Jakub Jelinek
2005-01-13 19:58 ` Andi Kleen
2005-01-13 21:11 ` Ulrich Drepper
2005-01-13 22:52 ` Han Boetes
2005-01-14 6:25 ` Willy Tarreau
2005-01-14 7:06 ` Ulrich Drepper
2005-01-14 14:08 ` Nix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050114042542.GB64314@gaz.sfgoth.com \
--to=mitch@sfgoth.com \
--cc=han@mijncomputer.nl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®