git://git.jankratochvil.net
/
captive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
19e7bd5
)
+Specific user error for loading MS Cabinet files (*.??_).
author
lace
<>
Mon, 26 Dec 2005 09:57:13 +0000
(09:57 +0000)
committer
lace
<>
Mon, 26 Dec 2005 09:57:13 +0000
(09:57 +0000)
src/libcaptive/client/options-module.c
patch
|
blob
|
history
diff --git
a/src/libcaptive/client/options-module.c
b/src/libcaptive/client/options-module.c
index
a81c2e5
..
8b83174
100644
(file)
--- a/
src/libcaptive/client/options-module.c
+++ b/
src/libcaptive/client/options-module.c
@@
-37,6
+37,8
@@
gboolean captive_options_module_load(struct captive_options_module *options_module,const gchar *pathname_utf8)
{
gboolean captive_options_module_load(struct captive_options_module *options_module,const gchar *pathname_utf8)
{
+const guint8 magic_mscf[]={'M','S','C','F',0,0,0,0};
+
g_return_val_if_fail(options_module!=NULL,FALSE);
g_return_val_if_fail(pathname_utf8!=NULL,FALSE);
g_return_val_if_fail(options_module!=NULL,FALSE);
g_return_val_if_fail(pathname_utf8!=NULL,FALSE);
@@
-77,6
+79,11
@@
char *hex,*s;
g_assert(isxdigit(*s));
}
}
g_assert(isxdigit(*s));
}
}
+ else if (options_module->u.pe32.length>=sizeof(magic_mscf)
+ && !memcmp(options_module->u.pe32.base,magic_mscf,sizeof(magic_mscf))) {
+ g_error(_("Compressed cabinet file (\"*.??_\") not loadable - you must use cabextract(1) or EXPAND.EXE first: %s"),
+ pathname_utf8);
+ }
else {
captive_rtl_file_munmap(options_module->u.pe32.base);
options_module->type=CAPTIVE_OPTIONS_MODULE_TYPE_GMODULE;
else {
captive_rtl_file_munmap(options_module->u.pe32.base);
options_module->type=CAPTIVE_OPTIONS_MODULE_TYPE_GMODULE;