Fix for INET 00/0
От | Bruce Momjian |
---|---|
Тема | Fix for INET 00/0 |
Дата | |
Msg-id | 199905250528.BAA07331@candle.pha.pa.us обсуждение исходный текст |
Список | pgsql-hackers |
This seems like the reasonable fix for this problem, and I am going to apply it. Any comments? --------------------------------------------------------------------------- Index: src/backend/utils/adt/inet_net_ntop.c =================================================================== RCS file: /usr/local/cvsroot/pgsql/src/backend/utils/adt/inet_net_ntop.c,v retrieving revision 1.4 diff -c -r1.4 inet_net_ntop.c *** src/backend/utils/adt/inet_net_ntop.c 1999/01/01 04:17:13 1.4 --- src/backend/utils/adt/inet_net_ntop.c 1999/05/25 05:17:40 *************** *** 207,213 **** /* Format whole octets plus nonzero trailing octets. */ tb = (bits == 32) ? 31 : bits; ! for (b = 0; b <= (tb / 8) || (b < len && *src != 0); b++) { if (size < sizeof "255.") gotoemsgsize; --- 207,213 ---- /* Format whole octets plus nonzero trailing octets. */ tb = (bits == 32) ? 31 : bits; ! for (b = 0; bits != 0 && (b <= (tb / 8) || (b < len && *src != 0)); b++) { if (size < sizeof "255.") goto emsgsize; -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: