Commit 15f0a82c authored by claes's avatar claes

Zero size in argument to gdh_RefObjectInfo caused segfault

parent 32bd517d
/* /*
* Proview $Id: rt_gdh.c,v 1.20 2005-10-12 12:59:35 claes Exp $ * Proview $Id: rt_gdh.c,v 1.21 2005-11-03 12:29:39 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -2806,6 +2806,8 @@ gdh_RefObjectInfoList ( ...@@ -2806,6 +2806,8 @@ gdh_RefObjectInfoList (
/* Associate buffers and return pwr_tSubid if requested. */ /* Associate buffers and return pwr_tSubid if requested. */
for (i=0; i<nsub; i++) { for (i=0; i<nsub; i++) {
if ( objrefp->bufsize == 0)
return GDH__BADARG;
objrefp = &objref[xrefarr[i]]; objrefp = &objref[xrefarr[i]];
gdh_SubAssociateBuffer(subidarr[i], &objrefp->adrs, objrefp->bufsize); gdh_SubAssociateBuffer(subidarr[i], &objrefp->adrs, objrefp->bufsize);
if (sid != NULL) sid[xrefarr[i]] = subidarr[i]; if (sid != NULL) sid[xrefarr[i]] = subidarr[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment