=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/rcs.c,v retrieving revision 1.233 retrieving revision 1.234 diff -c -r1.233 -r1.234 *** src/usr.bin/cvs/rcs.c 2008/01/10 09:35:02 1.233 --- src/usr.bin/cvs/rcs.c 2008/01/10 09:37:26 1.234 *************** *** 1,4 **** ! /* $OpenBSD: rcs.c,v 1.233 2008/01/10 09:35:02 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: rcs.c,v 1.234 2008/01/10 09:37:26 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 543,548 **** --- 543,551 ---- struct rcs_delta *rdp; RCSNUM *rev, *rootrev; + if (file->rf_head == NULL) + return NULL; + rev = rcsnum_alloc(); if (file->rf_branch != NULL) { /* we have a default branch, use that to calculate the *************** *** 3297,3306 **** size_t i; /* $Log: rcs.c,v $ /* Revision 1.233 2008/01/10 09:35:02 tobias ! /* Added support for keyword $Log$. In order to support $Log$, new lines have /* to be added which mustn't be expanded again (this log message for example ! /* would loop forever due to $Log$ keywords in it). /* line */ if (!(kwtype & RCS_KW_FULLPATH)) (void)strlcat(expbuf, --- 3300,3329 ---- size_t i; /* $Log: rcs.c,v $ + /* Revision 1.234 2008/01/10 09:37:26 tobias + /* RCS files without head keyword mustn't segfault our implementation. Only + /* command that supports such files is "cvs status", therefore properly handle + /* them in all other commands, too. + /* /* Revision 1.233 2008/01/10 09:35:02 tobias ! /* Added support for keyword $Log: rcs.c,v $ ! /* Added support for keyword Revision 1.234 2008/01/10 09:37:26 tobias ! /* Added support for keyword RCS files without head keyword mustn't segfault our implementation. Only ! /* Added support for keyword command that supports such files is "cvs status", therefore properly handle ! /* Added support for keyword them in all other commands, too. ! /* Added support for keyword. In order to support $Log: rcs.c,v $ ! /* Added support for keyword $Log$. In order to support Revision 1.234 2008/01/10 09:37:26 tobias ! /* Added support for keyword $Log$. In order to support RCS files without head keyword mustn't segfault our implementation. Only ! /* Added support for keyword $Log$. In order to support command that supports such files is "cvs status", therefore properly handle ! /* Added support for keyword $Log$. In order to support them in all other commands, too. ! /* Added support for keyword $Log$. In order to support, new lines have /* to be added which mustn't be expanded again (this log message for example ! /* would loop forever due to $Log: rcs.c,v $ ! /* would loop forever due to Revision 1.234 2008/01/10 09:37:26 tobias ! /* would loop forever due to RCS files without head keyword mustn't segfault our implementation. Only ! /* would loop forever due to command that supports such files is "cvs status", therefore properly handle ! /* would loop forever due to them in all other commands, too. ! /* would loop forever due to keywords in it). /* line */ if (!(kwtype & RCS_KW_FULLPATH)) (void)strlcat(expbuf, *************** *** 3386,3395 **** /* * This is just another hairy mess, but it must * be done: All characters behind $Log: rcs.c,v $ * be done: All characters behind Revision 1.233 2008/01/10 09:35:02 tobias ! * be done: All characters behind Added support for keyword $Log$. In order to support $Log$, new lines have * be done: All characters behind to be added which mustn't be expanded again (this log message for example ! * be done: All characters behind would loop forever due to $Log$ keywords in it). * be done: All characters behind will be * written in a new line next to log messages. * But that's not enough, we have to strip all --- 3409,3438 ---- /* * This is just another hairy mess, but it must * be done: All characters behind $Log: rcs.c,v $ + * be done: All characters behind Revision 1.234 2008/01/10 09:37:26 tobias + * be done: All characters behind RCS files without head keyword mustn't segfault our implementation. Only + * be done: All characters behind command that supports such files is "cvs status", therefore properly handle + * be done: All characters behind them in all other commands, too. + * be done: All characters behind * be done: All characters behind Revision 1.233 2008/01/10 09:35:02 tobias ! * be done: All characters behind Added support for keyword $Log: rcs.c,v $ ! * be done: All characters behind Added support for keyword Revision 1.234 2008/01/10 09:37:26 tobias ! * be done: All characters behind Added support for keyword RCS files without head keyword mustn't segfault our implementation. Only ! * be done: All characters behind Added support for keyword command that supports such files is "cvs status", therefore properly handle ! * be done: All characters behind Added support for keyword them in all other commands, too. ! * be done: All characters behind Added support for keyword. In order to support $Log: rcs.c,v $ ! * be done: All characters behind Added support for keyword $Log$. In order to support Revision 1.234 2008/01/10 09:37:26 tobias ! * be done: All characters behind Added support for keyword $Log$. In order to support RCS files without head keyword mustn't segfault our implementation. Only ! * be done: All characters behind Added support for keyword $Log$. In order to support command that supports such files is "cvs status", therefore properly handle ! * be done: All characters behind Added support for keyword $Log$. In order to support them in all other commands, too. ! * be done: All characters behind Added support for keyword $Log$. In order to support, new lines have * be done: All characters behind to be added which mustn't be expanded again (this log message for example ! * be done: All characters behind would loop forever due to $Log: rcs.c,v $ ! * be done: All characters behind would loop forever due to Revision 1.234 2008/01/10 09:37:26 tobias ! * be done: All characters behind would loop forever due to RCS files without head keyword mustn't segfault our implementation. Only ! * be done: All characters behind would loop forever due to command that supports such files is "cvs status", therefore properly handle ! * be done: All characters behind would loop forever due to them in all other commands, too. ! * be done: All characters behind would loop forever due to keywords in it). * be done: All characters behind will be * written in a new line next to log messages. * But that's not enough, we have to strip all