| 1 | 1 patch for repository darcs.haskell.org:/srv/darcs/ghc: |
|---|
| 2 | |
|---|
| 3 | Fri Apr 1 14:11:20 BST 2011 Max Bolingbroke <batterseapower@hotmail.com> |
|---|
| 4 | * Do not trust the BSD archive-supplied symbol length. Fixes #4901 |
|---|
| 5 | |
|---|
| 6 | New patches: |
|---|
| 7 | |
|---|
| 8 | [Do not trust the BSD archive-supplied symbol length. Fixes #4901 |
|---|
| 9 | Max Bolingbroke <batterseapower@hotmail.com>**20110401131120 |
|---|
| 10 | Ignore-this: 3a7aed46b05219ea8a66044c7120c12 |
|---|
| 11 | ] hunk ./rts/Linker.c 1775 |
|---|
| 12 | path); |
|---|
| 13 | } |
|---|
| 14 | fileName[thisFileNameSize] = 0; |
|---|
| 15 | + |
|---|
| 16 | + // In theory, the file name size we get from the large-filename field |
|---|
| 17 | + // should be exactly as long as the actual filename. However, in practice |
|---|
| 18 | + // we often see archives that only use some of the allocated space for |
|---|
| 19 | + // the filename. |
|---|
| 20 | + // |
|---|
| 21 | + // It is important that we get the right size here, because we use it below |
|---|
| 22 | + // to index into the filename and determine if it is an object file (#4901). |
|---|
| 23 | + thisFileNameSize = strlen(fileName); |
|---|
| 24 | } |
|---|
| 25 | else { |
|---|
| 26 | barf("loadArchive: BSD-variant filename size not found while reading filename from `%s'", path); |
|---|
| 27 | |
|---|
| 28 | Context: |
|---|
| 29 | |
|---|
| 30 | [TAG git migration |
|---|
| 31 | Ian Lynagh <igloo@earth.li>**20110331134846 |
|---|
| 32 | Ignore-this: 5572f46dda57e62defcb124c3a80069a |
|---|
| 33 | ] |
|---|
| 34 | Patch bundle hash: |
|---|
| 35 | 19a3fd47185e9be9974cf22c2f388330f8229118 |
|---|