aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2011-03-29 12:05:08 +0200
committerHenrik Nord <[email protected]>2011-03-29 12:05:21 +0200
commite36547e3a192b40437be01d3323655b9d257cdd6 (patch)
treee6482d43db27b3f68743154c9727eede75a8d811
parenta76e46c02ae57a39178a5c663e2c0c5c4cbfb30f (diff)
parent6ac05e50a77cc8ebcf335fd9d6908efc74e3e201 (diff)
downloadotp-e36547e3a192b40437be01d3323655b9d257cdd6.tar.gz
otp-e36547e3a192b40437be01d3323655b9d257cdd6.tar.bz2
otp-e36547e3a192b40437be01d3323655b9d257cdd6.zip
Merge branch 'tv/edoc-loop-fix' into dev
* tv/edoc-loop-fix: Fix infinite loop for malformed edoc input OTP-9165
-rw-r--r--lib/edoc/src/edoc_wiki.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/edoc/src/edoc_wiki.erl b/lib/edoc/src/edoc_wiki.erl
index b36aaae6ce..9a31bc9a82 100644
--- a/lib/edoc/src/edoc_wiki.erl
+++ b/lib/edoc/src/edoc_wiki.erl
@@ -296,6 +296,8 @@ push_uri(Us, Ss, As) ->
strip_empty_lines(Cs) ->
strip_empty_lines(Cs, 0).
+strip_empty_lines([], N) ->
+ {[], N}; % reached the end of input
strip_empty_lines(Cs, N) ->
{Cs1, Cs2} = edoc_lib:split_at(Cs, $\n),
case edoc_lib:is_space(Cs1) of