Commit 6e70f7b2 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Use gnm_destroy_password.

2004-06-08  Morten Welinder  <terra@gnome.org>

	* ms-excel-read.c (excel_read_FILEPASS): Use gnm_destroy_password.

2004-06-08  Morten Welinder  <terra@gnome.org>

	* src/gutils.c (gnm_destroy_password): New function.
parent 36c8f352
2004-06-08 Morten Welinder <terra@gnome.org>
* src/gutils.c (gnm_destroy_password): New function.
2004-06-05 Jody Goldberg <jody@gnome.org>
* src/sheet-object-image.c : add sax export, and actually dump the
......
......@@ -85,6 +85,8 @@ Morten:
* Fix a weird IF semantics where the argument count including
empties matters.
* Fix parser problem with single empty arg after expression. [backported]
* Avoid keeping passwords in memory. (Will need gtk+ fix to be really
effective.)
(For those worrying over the pile of accuracy fixes above it should
be noted that prior versions of Gnumeric were already pretty good,
......
2004-06-08 Morten Welinder <terra@gnome.org>
* src/gutils.c (gnm_destroy_password): New function.
2004-06-05 Jody Goldberg <jody@gnome.org>
* src/sheet-object-image.c : add sax export, and actually dump the
......
2004-06-08 Morten Welinder <terra@gnome.org>
* ms-excel-read.c (excel_read_FILEPASS): Use gnm_destroy_password.
2004-06-05 Jody Goldberg <jody@gnome.org>
* ms-excel-write.c (excel_write_chart) : sync the sizes when exporting
......
......@@ -5003,6 +5003,8 @@ excel_read_FILEPASS (BiffQuery *q, ExcelWorkbook *ewb)
return _("No password supplied");
if (ms_biff_query_set_decrypt (q, ewb->container.ver, passwd))
return NULL;
gnm_destroy_password (passwd);
g_free (passwd);
}
}
......
......@@ -948,3 +948,17 @@ gnm_get_real_name (void)
}
return gnm_real_name;
}
/**
* gnm_destroy_password :
*
* Overwrite a string holding a password. This is a separate routine to
* ensure that the compiler does not try to outsmart us.
*
* Note: this does not free the memory.
**/
void
gnm_destroy_password (char *passwd)
{
memset (passwd, 0, strlen (passwd));
}
......@@ -89,12 +89,14 @@ void gnm_string_append_gstring (GString *target, const GString *source);
char * gnumeric_utf8_strcapital (char const *p, ssize_t len);
const char* gnm_get_real_name (void);
void gnm_destroy_password (char *passwd);
GnmMemChunk *gnm_mem_chunk_new (char const *, size_t, size_t);
void gnm_mem_chunk_destroy (GnmMemChunk *, gboolean);
gpointer gnm_mem_chunk_alloc (GnmMemChunk *);
gpointer gnm_mem_chunk_alloc0 (GnmMemChunk *);
void gnm_mem_chunk_free (GnmMemChunk *, gpointer);
void gnm_mem_chunk_foreach_leak (GnmMemChunk *, GFunc, gpointer);
const char* gnm_get_real_name (void);
#endif /* GNUMERIC_UTILS_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment