Issue 111457 - The magic numbers / File Signature set in the word doucment during save is incorrect
Summary: The magic numbers / File Signature set in the word doucment during save is in...
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: OOo 3.2
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-07 13:53 UTC by sen_cool
Modified: 2017-05-20 11:22 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Sample microsoft word document created using MS office 2003 (23.50 KB, application/msword)
2010-05-07 13:56 UTC, sen_cool
no flags Details
Microsoft word 95 doc created using open office (6.00 KB, application/msword)
2010-05-07 13:57 UTC, sen_cool
no flags Details
Microsoft word 97/2000/XP doc created using open office (9.00 KB, application/msword)
2010-05-07 13:57 UTC, sen_cool
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description sen_cool 2010-05-07 13:53:46 UTC
All Microsoft Office documents have the magic numbers / File Signatures as follows
   
1st byte - D0
2nd byte - CF
3rd byte - 11
4th byte - E0

In addition to this, Microsoft WORD documents have the additions magic numbers /
File signatures as follows

512th byte - EC(236 in decimal)
513th byte - A5(165 in decimal)

However the word documents creating using OO by saving as Microsoft word 95 or
Microsoft word 97/2000/xp has the magic numbers as follows


512th byte - ffff fffd (-3 in dec)
513th byte - ffff ffff (-1 in dec)

The magic numbers / file signatures are used to identify the type of the file.
Since OO is setting a different magic number, we are unable to identify it as
word document.Hence, the documents created using OO should also have the same
magic numbers/ file signatures as used by Microsoft Office.
Comment 1 sen_cool 2010-05-07 13:56:32 UTC
Created attachment 69361 [details]
Sample microsoft word document created using MS office 2003
Comment 2 sen_cool 2010-05-07 13:57:10 UTC
Created attachment 69362 [details]
Microsoft word 95 doc created using open office
Comment 3 sen_cool 2010-05-07 13:57:39 UTC
Created attachment 69363 [details]
Microsoft word 97/2000/XP doc created using open office
Comment 4 michael.ruess 2010-05-10 14:06:21 UTC
At first I would say, that these "magic numbers" are used to identify whether a
doc has been saved by MS Word or any other application (like OOo or an OCR
software), so it is produced correctly by OOo. In this case your software has to
be adapted to recognize OOo's doc format also as "valid".

MRU->HBRINKM: could you please have a look and compare this with the .doc
specification? Thanks! 
Comment 5 sen_cool 2010-05-10 14:38:14 UTC
If this is the case, then there should be some way to differentiate between the
doc and xls files created by open office. The magic numbers present in the doc
and xls files are also same (both in the first byte and 512th byte). The file
signatures should be able to identify the file format, without relying on the
file extension. Is there any way to differentiate the doc and xls files created
by OOo?
Comment 6 Marcus 2017-05-20 11:22:39 UTC
Reset assigne to the default "issues@openoffice.apache.org".