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

1 year 8 months 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

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Thu, 02/19/2026 - 11:51
    gurux.dlms.cpp 9.0.2602.1901
  • Sun, 02/01/2026 - 19:47
    gurux.dlms.cpp 9.0.2602.0101
  • Tue, 01/20/2026 - 10:38
    gurux.dlms.java 4.0.89
  • Wed, 01/14/2026 - 14:29
    Gurux.DLMS.Python 1.0.196
  • Mon, 12/29/2025 - 10:38
    Gurux.Serial.Android 3.0.5

New forum topics

  • Gurux C library DLMS book edition support
  • Help with connection and read with landis+gyr e650 + CU-E22 using python
  • Preestablished connection
  • RJ11 to RS232 Pin out SECURE Premier 300
  • GENUS sugam 3 PH bidirectional
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin