Skip to content

Commit

Permalink
Prevent memory exhausted due to repeat appending "</table>"
Browse files Browse the repository at this point in the history
  • Loading branch information
tats committed Nov 24, 2016
1 parent 390e334 commit 2e18e9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions file.c
Expand Up @@ -6988,9 +6988,12 @@ completeHTMLstream(struct html_feed_environ *h_env, struct readbuffer *obuf)
obuf->table_level = MAX_TABLE - 1;

while (obuf->table_level >= 0) {
int tmp = obuf->table_level;
table_mode[obuf->table_level].pre_mode
&= ~(TBLM_SCRIPT | TBLM_STYLE | TBLM_PLAIN);
HTMLlineproc1("</table>", h_env);
if (obuf->table_level >= tmp)
break;
}
}

Expand Down

0 comments on commit 2e18e9a

Please sign in to comment.