Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gnumeric
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
375
Issues
375
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
gnumeric
Commits
45642675
Commit
45642675
authored
Sep 27, 1999
by
Arturo Tena/libole2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug: core dumped when open an inexistent file name.
parent
d2ac2696
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
plugins/excel/libole2/ChangeLog
plugins/excel/libole2/ChangeLog
+5
-0
plugins/excel/libole2/ms-ole.c
plugins/excel/libole2/ms-ole.c
+9
-3
No files found.
plugins/excel/libole2/ChangeLog
View file @
45642675
1999-09-26 Arturo Tena <arturo@directmail.org>
* ms-ole.c (ms_ole_open): Fixed bug: core dumped when called with an
inexistent file name.
1999-09-26 Michael Meeks <michael@nuclecu.unam.mx>
* ms-ole.c (read_bb): Add semicolon after assert.
...
...
plugins/excel/libole2/ms-ole.c
View file @
45642675
...
...
@@ -308,6 +308,7 @@ dump_header (MsOle *f)
printf
(
"Num BBD Blocks : %d Root %%d, SB blocks %d
\n
"
,
f
->
bb
?
f
->
bb
->
len
:-
1
,
/* f->pps?f->pps->len:-1, */
/* FIXME tenix, here is not f->num_pps? */
f
->
sb
?
f
->
sb
->
len
:-
1
);
printf
(
"-------------------------------------------------------------
\n
"
);
}
...
...
@@ -325,6 +326,11 @@ characterise_block (MsOle *f, BLP blk, char **ans)
*
ans
=
"special"
;
return
;
}
/* FIXME tenix added block type
else if (nblk == END_OF_CHAIN) {
*ans = "end of chain";
}
*/
*
ans
=
"unknown"
;
g_return_if_fail
(
f
);
g_return_if_fail
(
f
->
bb
);
...
...
@@ -1251,14 +1257,14 @@ ms_ole_open (MsOle **f, const char *name)
}
if
((
file
==
-
1
)
||
fstat
(
file
,
&
st
)
||
!
(
S_ISREG
(
st
.
st_mode
)))
{
printf
(
"No such file '%s'
\n
"
,
name
);
g_free
(
f
)
;
g_free
(
*
f
)
;
return
MS_OLE_ERR_EXIST
;
}
(
*
f
)
->
length
=
st
.
st_size
;
if
((
*
f
)
->
length
<=
0x4c
)
{
/* Bad show */
printf
(
"File '%s' too short
\n
"
,
name
);
close
(
file
)
;
g_free
(
f
)
;
g_free
(
*
f
)
;
return
MS_OLE_ERR_FORMAT
;
}
...
...
@@ -1272,7 +1278,7 @@ ms_ole_open (MsOle **f, const char *name)
if
(
!
(
*
f
)
->
mem
||
(
read
(
file
,
(
*
f
)
->
mem
,
BB_BLOCK_SIZE
)
==-
1
))
{
printf
(
"Error reading header
\n
"
);
g_free
(
f
);
g_free
(
*
f
);
return
MS_OLE_ERR_EXIST
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment