mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
hwp3.x: fix various paragraph content handlers
This commit is contained in:
parent
e748791d7b
commit
577b2524fe
1 changed files with 6 additions and 2 deletions
|
@ -796,7 +796,7 @@ static inline int parsehwp3_paragraph(cli_ctx *ctx, fmap_t *map, int p, int leve
|
|||
*/
|
||||
|
||||
#if HWP3_VERIFY
|
||||
if (fmap_readn(map, &length, offset, sizeof(length)) != sizeof(length))
|
||||
if (fmap_readn(map, &length, offset+2, sizeof(length)) != sizeof(length))
|
||||
return CL_EREAD;
|
||||
|
||||
if (fmap_readn(map, &match, offset+6, sizeof(match)) != sizeof(match))
|
||||
|
@ -811,11 +811,12 @@ static inline int parsehwp3_paragraph(cli_ctx *ctx, fmap_t *map, int p, int leve
|
|||
}
|
||||
|
||||
if (length != 34) {
|
||||
cli_errmsg("HWP3.x: Bookmark has incorrect length\n");
|
||||
cli_errmsg("HWP3.x: Bookmark has incorrect length: %u != 34)\n", length);
|
||||
return CL_EFORMAT;
|
||||
}
|
||||
#endif
|
||||
offset += 42;
|
||||
break;
|
||||
}
|
||||
case 7: /* date format */
|
||||
{
|
||||
|
@ -844,6 +845,7 @@ static inline int parsehwp3_paragraph(cli_ctx *ctx, fmap_t *map, int p, int leve
|
|||
}
|
||||
#endif
|
||||
offset += 84;
|
||||
break;
|
||||
}
|
||||
case 8: /* date code */
|
||||
{
|
||||
|
@ -874,6 +876,7 @@ static inline int parsehwp3_paragraph(cli_ctx *ctx, fmap_t *map, int p, int leve
|
|||
}
|
||||
#endif
|
||||
offset += 96;
|
||||
break;
|
||||
}
|
||||
case 9: /* tab */
|
||||
{
|
||||
|
@ -903,6 +906,7 @@ static inline int parsehwp3_paragraph(cli_ctx *ctx, fmap_t *map, int p, int leve
|
|||
}
|
||||
#endif
|
||||
offset += 8;
|
||||
break;
|
||||
}
|
||||
case 10: /* table, test box, equation, button, hypertext */
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue