Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > gnu.smalltalk.bug > #1
| Path | csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Mark Bratcher <mdbratch@gmail.com> |
| Newsgroups | gnu.smalltalk.bug |
| Subject | DBD-PostgreSQL PGTableColumnInfo>>initializeFrom: crash scenario |
| Date | Sun, 30 Aug 2015 16:31:08 -0400 |
| Lines | 25 |
| Approved | bug-gnu-smalltalk@gnu.org |
| Message-ID | <mailman.217.1440966694.19560.bug-gnu-smalltalk@gnu.org> (permalink) |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1440966694 31780 208.118.235.17 (30 Aug 2015 20:31:34 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-gnu-smalltalk@gnu.org |
| Envelope-to | bug-gnu-smalltalk@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=/gGFlSY6pjsGpxwxnjEZS1y2umFOUmbMtqtmcMyxCx4=; b=0+JP5EgNrUXh53jRlNRkcKmjd3Gg1b1L+A1KJ9zYu8j0r9oTUVCNPL1NbnWxIiDVW4 z89SMab4T01mIVkXXgptaiJ0UWT83ZGYXWAygl3J8XgJWYVdkm7+4pqgGqKTTqeQY7BB yiEgOl+pyAt5kkn415qowTn1+lN9BWSrWRabonXG/Rq0iTDH48WWeSifwQkG6OZnLCUA TTPIv2GZ70sKmrZEtlITZoN/8+9tT1hPGdNWt6pQNGTx2GoR4GVy8tJlpZdDqUTM921F kM3z6FcVWypAtpLeVsdo8cyT+B1dj6t5qPxjr+l2vSj2tXcv1C+QHzmuMDEt+gh+pYSm C1tA== |
| X-Received | by 10.55.195.80 with SMTP id a77mr4293941qkj.2.1440966688076; Sun, 30 Aug 2015 13:31:28 -0700 (PDT) |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
| X-detected-operating-system | by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). |
| X-Received-From | 2607:f8b0:400d:c09::22e |
| X-BeenThere | bug-gnu-smalltalk@gnu.org |
| X-Mailman-Version | 2.1.14 |
| Precedence | list |
| List-Id | Bug reports for the GNU implementation of Smalltalk <bug-gnu-smalltalk.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-gnu-smalltalk>, <mailto:bug-gnu-smalltalk-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-gnu-smalltalk> |
| List-Post | <mailto:bug-gnu-smalltalk@gnu.org> |
| List-Help | <mailto:bug-gnu-smalltalk-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-gnu-smalltalk>, <mailto:bug-gnu-smalltalk-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.smalltalk.bug:1 |
Show key headers only | View raw
The `initializeFrom:` selector for the `PGTableColumnInfo` class doesn't
check for nil values for the `prec` and `scale` values. Therefore, under
some conditions, the following will crash:
initializeFrom: aRow [
| prec radix scale |
name := aRow atIndex: 1.
type := aRow atIndex: 2.
size := aRow atIndex: 3.
prec := aRow atIndex: 4.
radix := aRow atIndex: 5.
scale := aRow atIndex: 6.
nullable := (aRow atIndex: 7) = 'YES'.
index := aRow atIndex: 8.
radix = 2 ifTrue: [ "if radix is nil, this crashes
prec := (prec / 3.32192809) ceiling."if prec is nil, this
crashes"
scale := (scale / 3.32192809) ceiling ]."if scale is nil,
this crashes"
This method needs to check wither there are actually values available at
`aRow` at indices 4, 5, and 6. Other indices might also need to be
checked, but I have not encountered these as faults (yet).
Back to gnu.smalltalk.bug | Next | Find similar
DBD-PostgreSQL PGTableColumnInfo>>initializeFrom: crash scenario Mark Bratcher <mdbratch@gmail.com> - 2015-08-30 16:31 -0400
csiph-web