Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/acpica/dist/dispatcher CID 1292510: Handle ...
details: https://anonhg.NetBSD.org/src/rev/dbe84eee1e83
branches: trunk
changeset: 340188:dbe84eee1e83
user: christos <christos%NetBSD.org@localhost>
date: Wed Aug 26 01:54:57 2015 +0000
description:
CID 1292510: Handle allocation failure.
diffstat:
sys/external/bsd/acpica/dist/dispatcher/dsutils.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (22 lines):
diff -r 04c676831a81 -r dbe84eee1e83 sys/external/bsd/acpica/dist/dispatcher/dsutils.c
--- a/sys/external/bsd/acpica/dist/dispatcher/dsutils.c Tue Aug 25 14:53:25 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsutils.c Wed Aug 26 01:54:57 2015 +0000
@@ -604,9 +604,15 @@
/* TBD: May only be temporary */
ObjDesc = AcpiUtCreateStringObject ((ACPI_SIZE) NameLength);
-
- strncpy (ObjDesc->String.Pointer, NameString, NameLength);
- Status = AE_OK;
+ if (!ObjDesc)
+ {
+ Status = AE_NO_MEMORY;
+ }
+ else
+ {
+ strncpy (ObjDesc->String.Pointer, NameString, NameLength);
+ Status = AE_OK;
+ }
}
else
{
Home |
Main Index |
Thread Index |
Old Index