On Wednesday 24 July 2002 20:55, Colin Desmond wrote: > I am trying to capture the Stdout from a process run through KProcess. ... > The buffer being returned and displayed is corrupted, here is an example: > > 0.00 0.00 8íÿ¿¢ 327/601319 > vnl_diag_matrix::operator()(unsigned int, unsigned int) [9] > ^^^^ corruption > > This occurs at various points throught the string (this example is 8248 > bytes long, although buflen is 1024) Do you mean the resulting string is 8248 bytes long, but buflen is only 1024 ? Then the data you receive in buffer is not 0-terminated, so you can't simply assign it to a string. Use something like memcpy() or 0-terminate it manually. Bye Alex >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<