Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dateFromHttpDateString: fixes #5

Open
bazineta opened this issue Jan 7, 2012 · 1 comment
Open

dateFromHttpDateString: fixes #5

bazineta opened this issue Jan 7, 2012 · 1 comment

Comments

@bazineta
Copy link

bazineta commented Jan 7, 2012

In datefromHttpDateString, the following two lines:

    if(((size_t)convertedCount != stringLength) || (usedBytes < 0L)) { return(NULL); }
    stringBuffer[convertedCount] = 0;

should instead be:

    if(((size_t)convertedCount != stringLength) || (usedBytes < 0L)) { return(nil); }
    stringBuffer[usedBytes] = '\0';
@steipete
Copy link
Owner

steipete commented Apr 5, 2012

Ah, you're right. John must have gotten that wrong. characters can be less than bytes used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants