diff options
Diffstat (limited to 'bsd-core')
-rw-r--r-- | bsd-core/drm_memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bsd-core/drm_memory.c b/bsd-core/drm_memory.c index 05343f3f..80891402 100644 --- a/bsd-core/drm_memory.c +++ b/bsd-core/drm_memory.c @@ -69,7 +69,7 @@ void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area) if (pt == NULL) return NULL; if (oldpt && oldsize) { - memcpy(pt, oldpt, oldsize); + memcpy(pt, oldpt, DRM_MIN(oldsize,size)); free(oldpt, M_DRM); } return pt; |