summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-04-22 20:07:31 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-04-22 20:07:31 +0000
commitd0072530551d282ca77a4bbd4664bee667251d26 (patch)
tree7553795b235ec75b517347fafa6a81e6c7d5b2a1
parentfc7892b785f5c74873cc42c6ba33f31efeb9a0ce (diff)
downloadmdk-d0072530551d282ca77a4bbd4664bee667251d26.tar.gz
mdk-d0072530551d282ca77a4bbd4664bee667251d26.tar.bz2
(cmd_pmem_) seg fault when freeing (changed) arg valued corrected
-rw-r--r--mixlib/mix_vm_command.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/mixlib/mix_vm_command.c b/mixlib/mix_vm_command.c
index aab6e3a..af9a52e 100644
--- a/mixlib/mix_vm_command.c
+++ b/mixlib/mix_vm_command.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mix_vm_command.c :
* Implementation of the functions declared in mix_vm_command.h
* ------------------------------------------------------------------
- * Last change: Time-stamp: "01/04/01 15:16:18 jose"
+ * Last change: Time-stamp: "2001-04-22 17:20:07 jao"
* ------------------------------------------------------------------
* Copyright (C) 2001 Free Software Foundation, Inc.
*
@@ -709,18 +709,19 @@ cmd_pmem_ (mix_vm_cmd_dispatcher_t *dis, const gchar *carg)
begin = end = atol (arg);
else if (arg[i] == '-')
{
+ gchar *narg;
arg[i++] = '\0';
begin = atol (arg);
- arg = arg + i;
+ narg = arg + i;
i = 0;
- while (isdigit (arg[i]))
+ while (isdigit (narg[i]))
i++;
- while (isspace (arg[i]))
+ while (isspace (narg[i]))
i++;
- if (arg[i] != '\0')
+ if (narg[i] != '\0')
error = TRUE;
else
- end = atol (arg);
+ end = atol (narg);
}
else
error = TRUE;