bug: vms_opendir - strcpy can not be used for overlaping moves.

John E. Malmberg wb8tyw at qsl.net
Thu Oct 28 03:42:54 GMT 2004


John E. Malmberg wrote:
> 
>> In the module VMS_SUPPORT/vms_opendir(), strcpy is being used to do an 
>> overlapping copy.
>>
>> Use of strcpy/strncpy for this can produce undefined results when the 
>> destination and source ranges overlap.
>>
>> memmove() needs to be used for these.
> 
> Just found the same bug in cvt_filespec/pw6_encode().  In this case it 
> did not seem to cause a noticable buffer overrun.

And the bug is also in vms_stat/vms_stat() in two places.

-John
wb8tyw at qsl.net
Personal Opinion Only



More information about the samba-vms mailing list