Changeset 152 for sbliveos2/trunk/lib32/memory.cpp
- Timestamp:
- Jul 17, 2000, 8:37:33 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sbliveos2/trunk/lib32/memory.cpp
r148 r152 129 129 void __copy_user(void *to, const void *from, unsigned long n) 130 130 { 131 if(to == NULL || from == NULL) { 132 DebugInt3(); 133 return; 134 } 135 if(n == 0) return; 131 136 #ifdef KEE 132 137 memcpy(to, from, n); … … 139 144 unsigned long copy_to_user(void *to, const void *from, unsigned long n) 140 145 { 146 if(to == NULL || from == NULL) { 147 DebugInt3(); 148 return 0; 149 } 150 if(n == 0) return 0; 141 151 #ifdef KEE 142 152 memcpy(to, from, n); … … 150 160 void __copy_user_zeroing(void *to, const void *from, unsigned long n) 151 161 { 162 if(to == NULL || from == NULL) { 163 DebugInt3(); 164 return; 165 } 166 if(n == 0) return; 152 167 copy_to_user(to, from, n); 153 168 } … … 156 171 unsigned long copy_from_user(void *to, const void *from, unsigned long n) 157 172 { 173 if(to == NULL || from == NULL) { 174 DebugInt3(); 175 return 0; 176 } 177 if(n == 0) return 0; 158 178 #ifdef KEE 159 179 memcpy(to, from, n); … … 167 187 int get_user(int size, void *dest, void *src) 168 188 { 189 if(size == 0) return 0; 190 191 if(dest == NULL || src == NULL) { 192 DebugInt3(); 193 return 0; 194 } 169 195 #ifdef KEE 170 196 memcpy(dest, src, size); … … 178 204 int put_user(int x, void *ptr) 179 205 { 206 if(ptr == NULL) { 207 DebugInt3(); 208 return 0; 209 } 210 180 211 *(int *)ptr = x; 181 212 return 0; … … 200 231 char near *addr; 201 232 233 if(size == 0) { 234 DebugInt3(); 235 return NULL; 236 } 202 237 if(size > 1024) { 203 238 #ifdef KEE
Note:
See TracChangeset
for help on using the changeset viewer.