Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Integer Overflow While Reading Long Profile

Integer overflow while reading long profile

By jan.kolar, 19 June, 2024
Forums
Gurux.DLMS

While reading long profile using ciphered association and GetRequest of type Get-request-next, the operation was terminated with error. After debugging I found that variable m_CipherIndex in class CGXReplyData which is of type unsigned short overflows when length of data is more than 65535. After changing data type to unsigned long, not only for variable but also for getter and setter and calls to setter function, all is OK.

Profile picture for user Kurumi

Kurumi

11 months 1 week ago

Hi, It's possible to change…

Hi,

It's possible to change m_CipherIndex to uint32_t, but I have to say that it's better to read profile generics in parts. It usually causes problems if all the data is try to read from the buffer.

This is changed to uint32_t in the next release.

BR,
Mikko

  • Log in or register to post comments
  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 05/20/2025 - 08:40
    gurux.dlms.c 9.0.2505.2001
  • Mon, 05/19/2025 - 10:19
    gurux.net.java 1.0.30
  • Mon, 05/19/2025 - 10:00
    gurux.dlms.c 9.0.2505.1901
  • Thu, 05/15/2025 - 16:26
    gurux.dlms.c 9.0.2505.1501
  • Wed, 05/14/2025 - 08:30
    gurux.dlms.c 9.0.2505.1401

New forum topics

  • Reading all "Data" object type parameter together
  • com_read getting failed for billing profile and instantaneous profile
  • Simulator connection closed
  • Regarding the dlms android project
  • Issue with "ServiceError Initiate Error exception. Service UNSUPPORTED"
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin