diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2012-04-24 14:53:48 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2012-04-24 14:53:48 +0200 |
commit | 16a67ba97d13a69b67dd86b01b7479016ff2f9f4 (patch) | |
tree | 07316b4729992f1cae76a7d81f1a3557e64596d7 /pgsql.c | |
parent | 6dbfae4e2bafac8dabab003814fbe58de0c8a594 (diff) | |
download | pgfuse-16a67ba97d13a69b67dd86b01b7479016ff2f9f4.tar.gz pgfuse-16a67ba97d13a69b67dd86b01b7479016ff2f9f4.tar.bz2 |
fixed segfault on size==0
Diffstat (limited to 'pgsql.c')
-rw-r--r-- | pgsql.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -318,6 +318,10 @@ int psql_read_buf( PGconn *conn, const int id, const char *path, char *buf, cons return tmp; } + if( meta.size == 0 ) { + return 0; + } + size = len; if( offset + size > meta.size ) { size = meta.size - offset; |