summaryrefslogtreecommitdiff
path: root/library/backend/vcc.y
Side-by-side diff
Diffstat (limited to 'library/backend/vcc.y') (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/vcc.y29
1 files changed, 14 insertions, 15 deletions
diff --git a/library/backend/vcc.y b/library/backend/vcc.y
index 4c79368..bec2955 100644
--- a/library/backend/vcc.y
+++ b/library/backend/vcc.y
@@ -442,5 +442,5 @@ static void enterProps(const char *s)
static void enterAttr(const char *s1, const char *s2)
{
- const char *p1, *p2;
+ const char *p1, *p2=0;
p1 = lookupProp_(s1);
if (s2) {
@@ -814,5 +814,5 @@ static void finiLex() {
* a decoded buffer (allocated with new). See RFC 1521.
*/
-static char * lexGetDataFromBase64()
+static int lexGetDataFromBase64()
{
unsigned long bytesLen = 0, bytesMax = 0;
@@ -827,4 +827,5 @@ static char * lexGetDataFromBase64()
while (1) {
c = lexGetc();
+ lexSkipWhite();
if (c == '\n') {
++mime_lineNum;
@@ -849,6 +850,4 @@ static char * lexGetDataFromBase64()
b = 0;
pad++;
- } else if ((c == ' ') || (c == '\t')) {
- continue;
} else { /* error condition */
if (bytes) free(bytes);
@@ -859,12 +858,15 @@ static char * lexGetDataFromBase64()
c = lexGetc();
while (c != EOF) {
- if (c == '\n' && lexLookahead() == '\n') {
- ++mime_lineNum;
- break;
+ if (c == '\n') {
+ lexSkipWhite();
+ if(lexLookahead() == '\n') {
+ ++mime_lineNum;
+ break;
+ }
}
c = lexGetc();
}
}
- return NULL;
+ return c != EOF;
}
trip = (trip << 6) | b;
@@ -912,5 +914,5 @@ static char * lexGetDataFromBase64()
free(oldBytes);
}
- return 0;
+ return bytesLen;
}
@@ -943,5 +945,5 @@ static char* lexGetQuotedPrintable()
lexClearToken();
- while (c != EOF && c != ';') {
+ while (c != EOF && (c != ';' || !fieldedProp)) {
if (c == '\n') {
// break, leave '\n' on remaining chars.
@@ -1033,9 +1035,6 @@ static int yylex() {
if (lexWithinMode(L_BASE64)) {
/* get each char and convert to bin on the fly... */
- p = lexGetDataFromBase64();
-#if 0
- yylval.str = p;
- return STRING;
-#endif
+ yylval.str = NULL;
+ return lexGetDataFromBase64() ? STRING : 0;
}
else if (lexWithinMode(L_QUOTED_PRINTABLE)) {