summaryrefslogtreecommitdiff
path: root/TSRM/tsrm_win32.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2007-02-24 02:17:47 +0000
committerMarcus Boerger <helly@php.net>2007-02-24 02:17:47 +0000
commit50ea26760da4e0fcf4980e739e1d0ed520de8d59 (patch)
tree888a32ce58864f5318a7f1072f8526c6a99212f9 /TSRM/tsrm_win32.c
parent3e262bd36989898ac01224f0a987e79f44d25b31 (diff)
downloadphp-git-50ea26760da4e0fcf4980e739e1d0ed520de8d59.tar.gz
- Avoid sprintf, even when checked copy'n'paste or changes lead to errors
Diffstat (limited to 'TSRM/tsrm_win32.c')
-rw-r--r--TSRM/tsrm_win32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index b60be0cc9c..4d1d3d303a 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -273,8 +273,8 @@ TSRM_API int shmget(int key, int size, int flags)
return -1;
}
- sprintf(shm_segment, "TSRM_SHM_SEGMENT:%d", key);
- sprintf(shm_info, "TSRM_SHM_DESCRIPTOR:%d", key);
+ snprintf(shm_segment, sizeof(shm_segment), "TSRM_SHM_SEGMENT:%d", key);
+ snprintf(shm_info, sizeof(shm_info), "TSRM_SHM_DESCRIPTOR:%d", key);
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);