aelfric / daisydiff

Automatically exported from code.google.com/p/daisydiff
0 stars 0 forks source link

Stack overflow when passing a URL with spaces #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
So reproduce, pass the following text into ChangeText.addText(String S)

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Development 
Environment 
(Windows)#section-Development+Environment+_28Windows_29-EXTEnvironment

It will infinite loop. 

When I change the URL to:

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Development+Environm
ent+(Windows)#section-Development+Environment+_28Windows_29-EXTEnvironment

or:

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Development%20Enviro
nment%20(Windows)#section-Development+Environment+_28Windows_29-EXTEnvironment

it seems to be fine. The issue is, this is part of a very very large text file, 
so it's very hard to sanitize it before it gets broken down by your function.

Original issue reported on code.google.com by br...@swaimdesign.com on 12 May 2011 at 11:58

GoogleCodeExporter commented 9 years ago
Hm, not quite as clear as I would like to be. I'll attach my source and 
compared text to be more clear. Notice the difference is that the original has 
%20s, the changed one doesn't

Original comment by br...@swaimdesign.com on 13 May 2011 at 12:09

Attachments:

GoogleCodeExporter commented 9 years ago
I am not sure I understand the issue here. Running daisydiff against the 
attached files (original.txt and changed.txt) produces a result (there is no 
infinite loop).
I run 'java -jar daisydiff.jar original.txt changed.txt' and the command 
finishes normally.

Did you mean something else? Am I missing something?

Basically attach some files that can be used directly on the command line tool. 
It is the easiest way to test.

Original comment by kkape...@gmail.com on 19 May 2011 at 9:12