diff options
author | rich cannings <richc@google.com> | 2011-01-24 18:19:11 -0800 |
---|---|---|
committer | rich cannings <richc@google.com> | 2011-01-24 18:19:11 -0800 |
commit | a0f5d51826fc3b7ee5937c9c0fb1df7e29e13b8b (patch) | |
tree | c09b63a9b25ce0ca8e9bbca82cf041505f9c4ed6 /android/skin | |
parent | b2d3df36e6e0d22c00fcddb51f9b0f4f754bfda4 (diff) | |
download | external_qemu-a0f5d51826fc3b7ee5937c9c0fb1df7e29e13b8b.zip external_qemu-a0f5d51826fc3b7ee5937c9c0fb1df7e29e13b8b.tar.gz external_qemu-a0f5d51826fc3b7ee5937c9c0fb1df7e29e13b8b.tar.bz2 |
putenv(3) misused. Corrected with setenv(3).
POS34-C. Do not call putenv() with a pointer to an automatic variable as
the argument:
Change-Id: I0c973edd2cc8d6c86287ec0258bca6a06f319bfb
https://www.securecoding.cert.org/confluence/display/seccode/POS34-C.+Do+not+call+putenv()+with+a+pointer+to+an+automatic+variable+as+the+argument
Diffstat (limited to 'android/skin')
-rw-r--r-- | android/skin/window.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/android/skin/window.c b/android/skin/window.c index e32a51f..57736e7 100644 --- a/android/skin/window.c +++ b/android/skin/window.c @@ -1252,9 +1252,9 @@ skin_window_resize( SkinWindow* window ) { char temp[32]; - sprintf(temp,"SDL_VIDEO_WINDOW_POS=%d,%d",window_x,window_y); - putenv(temp); - putenv("SDL_VIDEO_WINDOW_FORCE_VISIBLE=1"); + sprintf(temp, "%d,%d", window_x, window_y); + setenv("SDL_VIDEO_WINDOW_POS", temp, 1); + setenv("SDL_VIDEO_WINDOW_FORCE_VISIBLE", "1", 1); } flags = SDL_SWSURFACE; |