From: Dirk M. <dm...@gm...> - 2007-03-30 09:47:01
|
On Friday, 30. March 2007, Julian Seward wrote: > Oh, yes, you're right. Hang on. That's not good. I've thought about this some days ago. the reason why environment is special compared to other glibc functions is that it is something that interacts with process-external (other subprocesses for example). So it falls into the same class like the defined-ness checking for write(2) or similar syscallls, with the difference, that environment manipulation doesn't involve any significant syscalls (brk() at most). Thats why I want to add these special wrappers. No, I haven't used the code myself yet, but I've added it to the suse package and requested the bug reporter to test it ;) > Sounds reasonable; on the other hand it's a bit specialised and > would cause a false error in the case where you added an undefined > string to the environment and then never looked it up. Well, its the same like you write uninitialized memory to disk and never use it again. Plus you can still write a suppression if you really don't like it :) > Should be be in the business of checking arguments to arbitrary libc > functions? I had not realised this before, but the function wrapping > stuff makes it possible to do that if we want. A more generalized approach would be preferred, yes. So still ok to go ahead with the patch? Dirk |