Fossil

Check-in [7954ccba]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Do not attempt to parse control artifacts that do not end with a '\n' character. Ticket [be56c89def7f86bcbd]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7954ccba68bd84f9afb1cbef84a8544c31accf38
User & Date: drh 2010-10-16 16:24:24
References
2010-10-16
22:21 Ticket [38d7bb8c] segfault status still Fixed with 1 other change artifact: 6e620090 user: bharder
Context
2010-10-26
12:51
Merge the delta-manifest enhancement into the trunk. check-in: d13054ce user: drh tags: trunk
2010-10-22
01:04
Add some explanatory text to the update command to make it easier for new users to learn fossil. check-in: 858940c6 user: bcsmith tags: ui-improvements
2010-10-16
17:33
merge from trunk check-in: 586b0eb1 user: wolfgang tags: wolfgangHelpCmd
16:32
Bring over the latest bug fixes from trunk. check-in: b2175857 user: drh tags: experimental
16:24
Do not attempt to parse control artifacts that do not end with a '\n' character. Ticket [be56c89def7f86bcbd] check-in: 7954ccba user: drh tags: trunk
12:13
Do not free memory not obtained from malloc in the "fossil diff" command. Ticket [38d7bb8cf044219c2eff8]. check-in: ddb975e2 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/manifest.c.

199
200
201
202
203
204
205








206
207
208
209
210
211
212
*/
int manifest_parse(Manifest *p, Blob *pContent){
  int seenHeader = 0;
  int seenZ = 0;
  int i, lineNo=0;
  Blob line, token, a1, a2, a3, a4;
  char cPrevType = 0;









  memset(p, 0, sizeof(*p));
  memcpy(&p->content, pContent, sizeof(p->content));
  blob_zero(pContent);
  pContent = &p->content;

  blob_zero(&a1);







>
>
>
>
>
>
>
>







199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
*/
int manifest_parse(Manifest *p, Blob *pContent){
  int seenHeader = 0;
  int seenZ = 0;
  int i, lineNo=0;
  Blob line, token, a1, a2, a3, a4;
  char cPrevType = 0;

  /* Every control artifact ends with a '\n' character.  Exit early
  ** if that is not the case for this artifact. */
  i = blob_size(pContent);
  if( i<=0 || blob_buffer(pContent)[i-1]!='\n' ){
    blob_reset(pContent);
    return 0;
  }

  memset(p, 0, sizeof(*p));
  memcpy(&p->content, pContent, sizeof(p->content));
  blob_zero(pContent);
  pContent = &p->content;

  blob_zero(&a1);