if i understand your question right, you need to use c++ with safe vector/list
etc. normal c buffers are uncheckable in terms of overflow, unless you just
incert a check before every access, but this still allows other people to access
it in a unsafe way
just consider something like this
char* buf = char[size];
int size2 = size + 1;
f(size2,buf);
...
f(int size2,char*){
for (int i = 0; i < size2; i++){
buf[i] = buf[i] + 2;
}
}
how would a program be able to check that there is a overflow (other than adding
in checks manually as i mentioned before)
if you want to check buffer overflows and the like in specific cases, you might
want to check out gdb, there are some debugging features that (maybe) could help
you out
Quoting Jean-Philippe Martin <[EMAIL PROTECTED]>:
> Hi all,
>
> I vaguely remember that there exists some environment variable that, if
> set, will cause gcc (or the linker?) to add range checks to detect buffer
> overflows and the like. I tried googling for it, but didn't come up with
> anything.
>
> I'm sorry this is so vague. Hopefully, someone in the list has used that
> feature before and can see what I'm talking about?
>
> Thanks,
> JP
> _______________________________________________
> Siglinux mailing list
> [EMAIL PROTECTED]
> http://www.utacm.org/mailman/listinfo/siglinux
>
_______________________________________________
Siglinux mailing list
[EMAIL PROTECTED]
http://www.utacm.org/mailman/listinfo/siglinux