Hi! > In ltp-full-20130503 chmod02.c line 190 I believe that &buf should be just > buf. > This is because buf, declared at line 128, is already a pointer > to the string "file contents\n" and the system function write > requires as its second argument a pointer to the buffer to be written > to the file "tfile". > By looking to tfile I found that with &buf I got unreadable data > while with buf I got "file contents" as it should be.
This test was rewritten (see commit 8a575d291217d366b6d1f04b5608d3258ebde9cf) > In sigrelse01.c line 646 the function write_pipe attempts to write > MAXMESG bytes from its second argument to the pipe. > MAXMESG is declared as 512 at line 149. > At line 291 write_pipe is called with READY as the buffer pointer. > READY is defined at line 151 as the string "ready". > "ready" is only six bytes long, including the null at its end, > while write_pipe attempts to transfer 512 bytes. > I think this is questionable because nobody knows the contents of the > other 506 bytes, you may even get a segmentation fault > because the data area is shorter, depending on the implementation. That looks like a bug in the test to me, the write pipe should get the size of the message as a parameter and use it for the write. (And the test should be cleaned up too, there is too much useless comments for example.) Do you want to send a patch that fixes this one? (signed patch against latest git is best way to go) -- Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
