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

John E. Malmberg wb8tyw at qsl.net
Sun Oct 24 22:42:47 GMT 2004


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.

Use of strcpy/strncpy can cause a buffer overrun, which in the case I 
have been chasing down this afternoon, overwrote the stack when built in 
/NOOPT/DEBUG mode.

-John
wb8tyw at qsl.net
Personal Opinion Only



More information about the samba-vms mailing list