Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Facebook
Downloads
Home
>
mailing lists
Re: Ask for two questions on psqlodbc - Mailing list pgsql-odbc
From
cobainpluto
Subject
Re: Ask for two questions on psqlodbc
Date
July 7, 2014
13:38:08
Msg-id
BAY180-W5472544A2F7323D97C7A85F70D0@phx.gbl
Whole thread
Raw
In response to
Re: Ask for two questions on psqlodbc
("Inoue, Hiroshi" <inoue@tpf.co.jp>)
Responses
Re: Ask for two questions on psqlodbc
List
pgsql-odbc
Tree view
Dear,
Could you please tell me when will you fix it?
Thanks!
regards,
Pluto Cobain
> Date: Thu, 3 Jul 2014 23:35:33 +0900
> From: inoue@tpf.co.jp
> To: pluto_cbin@outlook.com; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Ask for two questions on psqlodbc
>
> Hi,
>
> (2014/07/02 18:09), cobainpluto wrote:
> > Dear all,
> > Recently, I used Static Code Analyzer(Fortify) to analyze
> > psqlodbc-09.03.0300 codes, and found two potential Memory Leak
> > problems in qresult.c file.
> >
> > Details are as follows :
> > 1.Potential Memory Leak problem
> > qresult.c:962: in QR_next_tuple()
> > 962 mres = CC_send_query(conn, movecmd, NULL, 0, stmt);
> > There is a dynamically allocated memory in CC_send_query_append(...).
> > If follow the below path, from here to RETURN (-1), the applied memory
> > space is not free, so it is possiblehas to generate Memory
> > Leak.
> > ---------------------------------------------------------------
> > qresult.c:963 - BranchNotTaken : Branch not taken: (mres != 0)
> > qresult.c:971 - BranchTaken : Branch taken: (sscanf(mres->command, "MOVE
> > %lu", (&moved)) > 0)
> > qresult.c:974 - BranchTaken : Branch taken: (moved < movement)
> > qresult.c:993 - BranchTaken : Branch taken: (2 == self->move_direction)
> > qresult.c:998 - BranchTaken : Branch taken: (getNthValid(self, (<inline
> > expression> - 1), 4, self->move_offset, (&backpt)) < 0)
> > qresult.c:1004 - EndScope : RETURN(-1)
>
> It seems a memory leak.
> I would fix it.
>
> > ---------------------------------------------------------------
> >
> > 2、Potential Null Dereference problem
> > qresult.c:1691: in QR_read_a_tuple_from_db()
> > 1691 &this_keyset->blocknum, &this_keyset->offset);
> > qresult.c:1693: in QR_read_a_tuple_from_db()
> > 1693 this_keyset->oid = strtoul(buffer, NULL, 10);
> > Here reference to the this_keyset.
> > If follow the below path,value of this_keyset is always NULL before
> > referring to this_keyset, so it is possiblehas to generate Null
> > Dereference possible.
> > ---------------------------------------------------------------
> > qresult.c:1571 - Assigned null : KeySet *this_keyset = NULL;
> > qresult.c:1590 - BranchNotTaken : Branch not taken: (0 == (self->flags & 1))
> > qresult.c:1624 - BranchTaken : Branch taken: (field_lf < ci_num_fields)
> > qresult.c:1668 - BranchNotTaken : Branch not taken: (isnull == 0)
> > qresult.c:1676 - BranchTaken : Branch taken: (field_lf >= effective_cols)
> > qresult.c:1687 - BranchTaken : Branch taken: (field_lf >= effective_cols)
>
> Though I'm suspcious if it could occur, I would check it.
>
> Thanks.
> Hiroshi Inoue
>
>
> --
> Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-odbc
pgsql-odbc
by date:
Previous
From:
sunpeng
Date:
07 July 2014, 09:06:55
Subject:
Re: Using VC2008 to store bytea, I got AppendChunk error 800a0c93
Next
From:
"Inoue, Hiroshi"
Date:
07 July 2014, 23:56:41
Subject:
Re: Ask for two questions on psqlodbc
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
I confirm that I have read and accepted PostgresPro’s
Privacy Policy
.
I agree to get Postgres Pro discount offers and other marketing communications.
✖
×
×
Everywhere
Documentation
Mailing list
List:
all lists
pgsql-general
pgsql-hackers
buildfarm-members
pgadmin-hackers
pgadmin-support
pgsql-admin
pgsql-advocacy
pgsql-announce
pgsql-benchmarks
pgsql-bugs
pgsql-chat
pgsql-cluster-hackers
pgsql-committers
pgsql-cygwin
pgsql-docs
pgsql-hackers-pitr
pgsql-hackers-win32
pgsql-interfaces
pgsql-jdbc
pgsql-jobs
pgsql-novice
pgsql-odbc
pgsql-patches
pgsql-performance
pgsql-php
pgsql-pkg-debian
pgsql-pkg-yum
pgsql-ports
pgsql-rrreviewers
pgsql-ru-general
pgsql-sql
pgsql-students
pgsql-testers
pgsql-translators
pgsql-www
psycopg
Period
anytime
within last day
within last week
within last month
within last 6 months
within last year
Sort by
date
reverse date
rank
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
By continuing to browse this website, you agree to the use of cookies. Go to
Privacy Policy
.
I accept cookies