[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gv] [PATCH] don't store stat output in random memory location
From: |
Bernhard R. Link |
Subject: |
[bug-gv] [PATCH] don't store stat output in random memory location |
Date: |
Wed, 27 Apr 2011 20:15:23 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
---
src/resource.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/resource.c b/src/resource.c
index c50e83a..81deca6 100644
--- a/src/resource.c
+++ b/src/resource.c
@@ -264,12 +264,12 @@ resource_buildDatabase (
if (!i18n)
{
- struct stat* buf;
+ struct stat buf;
strcpy(tmp,GV_LIBDIR "/nls/");
strcat(tmp, locale1);
strcat(tmp, ".dat");
- if (!stat(tmp, buf))
+ if (!stat(tmp, &buf))
{
i18n = 1;
XrmCombineFileDatabase(tmp,&db,True);
@@ -314,12 +314,12 @@ resource_buildDatabase (
if (!i18n)
{
- struct stat* buf;
+ struct stat buf;
strcpy(tmp,GV_LIBDIR "/nls/");
strcat(tmp, locale2);
strcat(tmp, ".dat");
- if (!stat(tmp, buf))
+ if (!stat(tmp, &buf))
{
i18n = 1;
XrmCombineFileDatabase(tmp,&db,True);
@@ -359,12 +359,12 @@ resource_buildDatabase (
if (!i18n)
{
- struct stat* buf;
+ struct stat buf;
strcpy(tmp,GV_LIBDIR "/nls/");
strcat(tmp, locale3);
strcat(tmp, ".dat");
- if (!stat(tmp, buf))
+ if (!stat(tmp, &buf))
{
i18n = 1;
XrmCombineFileDatabase(tmp,&db,True);
--
1.5.6.5
- [bug-gv] [PATCH] don't store stat output in random memory location,
Bernhard R. Link <=