[sheepdog] [PATCH] sheep: fix improper strncmp usage in fill_vdi_info_range()

2013-12-03 Thread Ryusuke Konishi
The following usage of strncmp in fill_vdi_info_range function is a misuse. It is inefficient and also unsafe because it can overrun if inode-name is not terminated with a null byte due to malformed inode object: strncmp(inode-name, name, strlen(inode-name)) This fixes the issue by replacing

Re: [sheepdog] [PATCH] sheep: fix improper strncmp usage in fill_vdi_info_range()

2013-12-03 Thread Liu Yuan
On Wed, Dec 04, 2013 at 11:53:57AM +0900, Ryusuke Konishi wrote: The following usage of strncmp in fill_vdi_info_range function is a misuse. It is inefficient and also unsafe because it can overrun if inode-name is not terminated with a null byte due to malformed inode object: