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

Fix crash caused by empty named_properties table #410

Merged
merged 1 commit into from
Dec 16, 2015
Merged

Fix crash caused by empty named_properties table #410

merged 1 commit into from
Dec 16, 2015

Conversation

roelvanmeer
Copy link
Contributor

If the named_properties table is empty, the query
SELECT max(mappedId) FROM


returns NULL, causing a crash in strtol() later.
Checking if row[0] is not NULL makes the code return MAPISTORE_ERR_DATABASE_OPS instead of crashing.

If the named_properties table is empty, the query
  SELECT max(mappedId) FROM <table>
returns NULL, causing a crash in strtol() later.
Checking if row[0] is not NULL makes the code return
MAPISTORE_ERR_DATABASE_OPS instead of crashing.
@sixstone-qq
Copy link
Contributor

👍

jkerihuel added a commit that referenced this pull request Dec 16, 2015
Fix crash caused by empty named_properties table
@jkerihuel jkerihuel merged commit 03bae8f into openchange:master Dec 16, 2015
@jkerihuel
Copy link
Member

applied, thx @roelvanmeer!

@roelvanmeer roelvanmeer deleted the fix-crashes branch April 1, 2016 15:09
x0f5c3 added a commit to rustident/openchange that referenced this pull request Sep 24, 2023
Merge pull request openchange#410 from roelvanmeer/fix-crashes
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

Successfully merging this pull request may close these issues.

3 participants