From owner-freebsd-bugs Thu Jul 18 14:34:15 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA19114 for bugs-outgoing; Thu, 18 Jul 1996 14:34:15 -0700 (PDT) Received: from george.lbl.gov (george-2.lbl.gov [131.243.2.12]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id OAA19104 for ; Thu, 18 Jul 1996 14:34:11 -0700 (PDT) Received: (jin@localhost) by george.lbl.gov (8.6.10/8.6.5) id OAA00092; Thu, 18 Jul 1996 14:34:10 -0700 Date: Thu, 18 Jul 1996 14:34:10 -0700 From: "Jin Guojun[ITG]" Message-Id: <199607182134.OAA00092@george.lbl.gov> To: joerg_wunsch@uriah.heep.sax.de Subject: Re: ipcs.c bug -- fixing attached Cc: bugs@freebsd.org Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk } > Wrong argument msginfo used for shminfo. It causes core dump on command } > ipcs -m } } Thanks, about to commit it. You are welcome. } > Here is the fixing: } > } > ------------------ usr/src/usr.bin/ipcs: patch ------------------------------ } > diff ipcs.c ipcs.c.new } > 313c313 } } Please, better submint context diffs (-c or -u). Yup, I forget to mention the version #. I tought it is a simple line, the patch should find it without a problem. Here is the diff -c one: *** ipcs.c Thu Jul 18 14:30:02 1996 --- ipcs.c.new Thu Jul 18 09:51:11 1996 *************** *** 310,316 **** struct shmid_ds *xshmids; kvm_read(kd, symbols[X_SHMSEGS].n_value, &shmsegs, sizeof(shmsegs)); ! xshmids = malloc(sizeof(struct shmid_ds) * msginfo.msgmni); kvm_read(kd, (u_long) shmsegs, xshmids, sizeof(struct shmid_ds) * shminfo.shmmni); --- 310,316 ---- struct shmid_ds *xshmids; kvm_read(kd, symbols[X_SHMSEGS].n_value, &shmsegs, sizeof(shmsegs)); ! xshmids = malloc(sizeof(struct shmid_ds) * shminfo.shmmni); kvm_read(kd, (u_long) shmsegs, xshmids, sizeof(struct shmid_ds) * shminfo.shmmni);