diff options
author | Austin Yuan <shengquan.yuan@intel.com> | 2009-02-05 23:23:55 -0500 |
---|---|---|
committer | Austin Yuan <shengquan.yuan@intel.com> | 2009-02-05 23:23:55 -0500 |
commit | 9fc2fdfcc1940c3b7de4b7f2a3a7c18d7e987ab8 (patch) | |
tree | a575aaaa02a0acdeece435cbb84cbb24b6f39489 | |
parent | fee5a4725c739beca1f5dc4ecb8f0e1ee1e381aa (diff) |
Fixed strncpy isssue, should copy "\0" too
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
-rw-r--r-- | src/va.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -143,7 +143,7 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) char *driver_path = (char *) malloc( strlen(driver_dir) + strlen(driver_name) + strlen(DRIVER_EXTENSION) + 2 ); - strncpy( driver_path, driver_dir, strlen(driver_dir) ); + strncpy( driver_path, driver_dir, strlen(driver_dir) + 1); strncat( driver_path, "/", strlen("/") ); strncat( driver_path, driver_name, strlen(driver_name) ); strncat( driver_path, DRIVER_EXTENSION, strlen(DRIVER_EXTENSION) ); |