annotate templates/search.tmpl @ 827:a61728b58dc0

Fix array overflow bug in bdiff I ran into a bug while importing a large repository into mercurial. The diff algorithm does not allocate a big enough array of hunks for some test cases. This results in memory corruption, and possibly, as in my case, a seg fault. You should be able to reproduce this problem with any case of more than a few lines that follows this pattern: a b = = 1 1 2 2 3 4 3 5 . 4 . . 5 . . . I.e., "a" has blank lines on every other line that have been removed in "b". In this case, the number of matching hunks is equal to the number of lines in "b". This is more than ((an + bn)/4 + 2). I'm not sure what motivates this formula, but when I changed it to the smaller of an or bn (+ 1), it works. [comment added by mpm]
author "Wallace, Eric S" <eric.s.wallace@intel.com>
date Thu, 04 Aug 2005 13:25:59 -0800
parents 7140bc781655
children 17703aa4491e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
538
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
1 #header#
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
2 <title>#repo|escape#: searching for #query|escape#</title>
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
3 </head>
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
4 <body>
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
5
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
6 <div class="buttons">
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
7 <a href="?cmd=changelog;rev=#rev#">changelog</a>
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
8 <a href="?cmd=tags">tags</a>
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
9 <a href="?cmd=manifest;manifest=#manifest#;path=/">manifest</a>
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
10 </div>
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
11
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
12 <h2>searching for #query|escape#</h2>
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
13
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
14 <form>
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
15 search:
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
16 <input type="hidden" name="cmd" value="changelog">
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
17 <input name="rev" type="text" width="30" value="#query|escape#">
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
18 </form>
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
19
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
20 #entries#
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
21
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
22 <form>
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
23 search:
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
24 <input type="hidden" name="cmd" value="changelog">
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
25 <input name="rev" type="text" width="30">
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
26 </form>
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
27
7140bc781655 Add multiple keyword search to hgweb
mpm@selenic.com
parents:
diff changeset
28 #footer#