Ticket #3124: patch.2.diff
File patch.2.diff, 1.4 KB (added by , 16 years ago) |
---|
-
src/system/kernel/fs/vfs.cpp
5470 5470 return B_BAD_ADDRESS; 5471 5471 5472 5472 ASSERT(entry->d_reclen >= sizeof(struct dirent)); 5473 ASSERT(entry->d_reclen <= sizeof(buffer)); 5473 5474 5474 5475 if (user_memcpy(entry->d_name, userEntry->d_name, 5475 entry->d_reclen - sizeof(struct dirent) ) != B_OK)5476 entry->d_reclen - sizeof(struct dirent) + 1) != B_OK) 5476 5477 return B_BAD_ADDRESS; 5477 5478 } else 5478 5479 entry = userEntry; -
src/libs/compat/freebsd_network/if.c
67 67 void 68 68 if_free(struct ifnet *ifp) 69 69 { 70 u_short clear; 71 // if_index may be uninitialized 72 if (gDeviceNameList[ifp->if_index] == ifp->device_name) { 73 if (ifp->if_index == gDeviceCount - 1) { 74 clear= ifp->if_index; 75 } else { 76 clear= gDeviceCount - 1; 77 gDevices[ifp->if_index] = gDevices[clear]; 78 gDeviceNameList[ifp->if_index] = gDeviceNameList[clear]; 79 gDevices[ifp->if_index]->if_index = ifp->if_index; 80 } 81 82 gDeviceNameList[clear] = 0; 83 gDevices[clear] = 0; 84 gDeviceCount--; 85 } 86 70 87 IF_ADDR_LOCK_DESTROY(ifp); 71 88 if (ifp->if_type == IFT_ETHER) 72 89 _kernel_free(ifp->if_l2com);