Hi Vu,

"Consistent" in AIS spec seems not clear, some can inteprete to count length 
with null pointer, some may not. This issue had been flagged in review of 
#2038. After this check is introduced, applications may still be running 
without problem, some may receive INVALID_PARAM. I guess it's possibly due to 1 
byte difference of null. 
This issue is seen during upgrade, I'm not sure if application wants to change 
their code which is running without problem previously after application uses 
the Opensaf version having this check. I suppose both NTF and LOG can make this 
check a bit friendly. But the Opensaf version in this reported problem does not 
have that check for NTF, so I raise it under LOGsv. If we include this check 
for NTF, those applications will fail straight away, it could result in 
coredump or error.

Thanks,
Minh



---

** [tickets:#2285] LOG: Check size of logBufSize could be non backward 
compatible**

**Status:** unassigned
**Milestone:** 5.0.2
**Created:** Thu Feb 02, 2017 01:44 AM UTC by Minh Hon Chau
**Last Updated:** Thu Feb 02, 2017 02:10 AM UTC
**Owner:** nobody


NTF has received INVALID_PARAM when logging notification 

Jan 31 13:05:28.661574 osafntfd [12166:lga_api.c:1136] >> saLogWriteLogAsync
Jan 31 13:05:28.661578 osafntfd [12166:lga_api.c:0989] >> handle_log_record
Jan 31 13:05:28.661582 osafntfd [12166:lga_api.c:1094] << handle_log_record
Jan 31 13:05:28.661586 osafntfd [12166:lga_api.c:1171] TR logBufSize > 
strlen(logBuf) + 1
Jan 31 13:05:28.661589 osafntfd [12166:lga_api.c:1291] << saLogWriteLogAsync
Jan 31 13:05:28.661611 osafntfd [12166:NtfLogger.cc:0255] NO Failed to log an 
alarm or security alarm notification (7)

This notification comes from application who specifies the lengthAdditionalText 
and additionalText. If a check that returns INVALID_PARAM in relation to size 
of AdditonalText and it causes existing application fails to log, then this 
check probably is non backward compatible.

The mismatch in size of additionalText could be a misuse of sizeof() from 
application side, in similar way which has been reported in #2038.

INVALID_PARAM should be avoided, and Log Agent can adjust to expected size and 
gives a log warning, so that the existing application can log.

A similar check in NTF Agent also can be a similar problem potentially.


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to