|
|
Sponsor |
Re: Fix for buffer overflow ready [was: Fwd: Bug#247306: odbc-postgresql: S: msg#00019db.postgresql.odbc
Martin Pitt wrote: > The problem is that make_string() in misc.c does not check whether > the target buffer is big enough to hold the copied string. > > I added a bufsize parameter to make_string() and used it in all calls > to it. I tried it with my php4 crash test script and now it works > properly. Silently truncating various pieces of information is probably not the right thing. What are you truncating? If it's a query string you might open yourself up to SQL-injection type problems. Plus, the ODBC driver appears to have buffer overruns all over the place. We need to replace every instance of strcpy, strcat, sprintf, make_string, and the various other feeble attempts with pqexpbuffer from libpq. That's the only way to solve this problem once and for all. ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Bug#247306: Fix for buffer overflow ready [was: Fwd: Bug#247306: odbc-postgresql: SIGSEGV with long inputs (> 10000 bytes)], Martin Pitt |
|---|---|
| Next by Date: | Re: Fix for buffer overflow ready [was: Fwd: Bug#247306: odbc-postgresql: SIGSEGV with long inputs (> 10000 bytes)], Martin Pitt |
| Previous by Thread: | Bug#247306: Fix for buffer overflow ready [was: Fwd: Bug#247306: odbc-postgresql: SIGSEGV with long inputs (> 10000 bytes)], Martin Pitt |
| Next by Thread: | Re: Fix for buffer overflow ready [was: Fwd: Bug#247306: odbc-postgresql: SIGSEGV with long inputs (> 10000 bytes)], Martin Pitt |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|