OL> You can avoid the memcpy() if you first read only the header, allocate OL> the string, and then read data into it. I've changed it to a _ckpt_read_obj_type(.., NULL, ..) and a ckpt_kread() to avoid the memcpy(). OL> On top of this you can have ckpt_read_string() that will verify that OL> the buffer is of non-zero length and null terminated ? What I had ensured a null-terminated string (kzalloc() and len+1). Is this really the appropriate place to ensure that the string is non-zero length? Maybe not in the realm of paths and socket names, but I can see other places where writing a zero-length string might be appropriate... -- Dan Smith IBM Linux Technology Center email: danms@xxxxxxxxxx _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers